Back to Skills

ctl-release

majiayu000
Updated Today
14 views
58
9
58
View on GitHub
Metadesign

About

The ctl-release skill updates and rebuilds spikectl or ctl CLI packages in the monorepo when source code changes occur. It handles compilation, Nix builds, and binary testing to ensure CLI tools are properly updated after refactoring. Developers use it to maintain distribution-ready binaries with automated validation checks.

Quick Install

Claude Code

Recommended
Plugin CommandRecommended
/plugin add https://github.com/majiayu000/claude-skill-registry
Git CloneAlternative
git clone https://github.com/majiayu000/claude-skill-registry.git ~/.claude/skills/ctl-release

Copy and paste this command in Claude Code to install this skill

Documentation

Option: CTL Release

Initiation (I)

Invoke when:

  • Source code changed in packages/spikectl/ or packages/ctl/
  • Need to rebuild CLI binaries for Nix distribution
  • Updating CLI tools after refactoring

Observation Space (Y)

ObservableHow to Check
Source modifiedgit status packages/{spikectl,ctl}/src/
Binary staleCompare bin/ mtime vs src/ mtime
TypeScript validbunx tsc --noEmit

Action Space (U)

ActionCommandFrom Directory
compilebun build --compile --minify src/index.ts --outfile bin/<name>packages/<pkg>/
build-nixnix build '.?dir=packages/tmnl#<pkg>'repo root
test-binary./result/bin/<pkg> --versionrepo root
update-locknix flake update <pkg>packages/tmnl/

Policy (π)

STATE: source_changed ∧ ¬binary_updated
  → ACTION: compile

STATE: binary_updated ∧ need_nix_build
  → ACTION: build-nix

STATE: flake_deps_changed
  → ACTION: update-lock → build-nix

STATE: build_complete
  → ACTION: test-binary → TERMINATE

Termination (β)

ConditionExit
./result/bin/<pkg> --version succeedsSUCCESS
TypeScript errorsFAIL: fix errors
Nix build failsFAIL: check flake.nix

Q-Heuristics

SituationGuidance
Source-only changesSkip nix flake update - path: inputs evaluate live
New dependencies in flake.nixMust run nix flake update <pkg>
Binary size changed significantlyVerify correct bundling

Constraints

  • □(compile_before_nix_build) — Always compile before Nix build
  • □(test_after_build) — Always verify binary works after build
  • ◇(version_incremented) — Eventually bump version for releases

Commands

Quick Rebuild

cd packages/spikectl
bun build --compile --minify src/index.ts --outfile bin/spikectl

Full Release

cd packages/spikectl
bun build --compile --minify src/index.ts --outfile bin/spikectl
git add bin/spikectl
git commit -m "build(spikectl): v0.x.x"

cd ../..
nix build '.?dir=packages/tmnl#spikectl'
./result/bin/spikectl --version

DevShell Access

nix develop '.?dir=packages/tmnl#tmnl-ctl'
# Now spikectl and ctl are in PATH

Why No Flake Update for Source Changes?

The tmnl flake uses path: inputs:

spikectl = { url = "path:../spikectl"; }

No hash lock → changes picked up on rebuild.

GitHub Repository

majiayu000/claude-skill-registry
Path: skills/ctl-release

Related Skills

content-collections

Meta

This skill provides a production-tested setup for Content Collections, a TypeScript-first tool that transforms Markdown/MDX files into type-safe data collections with Zod validation. Use it when building blogs, documentation sites, or content-heavy Vite + React applications to ensure type safety and automatic content validation. It covers everything from Vite plugin configuration and MDX compilation to deployment optimization and schema validation.

View skill

creating-opencode-plugins

Meta

This skill provides the structure and API specifications for creating OpenCode plugins that hook into 25+ event types like commands, files, and LSP operations. It offers implementation patterns for JavaScript/TypeScript modules that intercept and extend the AI assistant's lifecycle. Use it when you need to build event-driven plugins for monitoring, custom handling, or extending OpenCode's capabilities.

View skill

langchain

Meta

LangChain is a framework for building LLM applications using agents, chains, and RAG pipelines. It supports multiple LLM providers, offers 500+ integrations, and includes features like tool calling and memory management. Use it for rapid prototyping and deploying production systems like chatbots, autonomous agents, and question-answering services.

View skill

cloudflare-turnstile

Meta

This skill provides comprehensive guidance for implementing Cloudflare Turnstile as a CAPTCHA-alternative bot protection system. It covers integration for forms, login pages, API endpoints, and frameworks like React/Next.js/Hono, while handling invisible challenges that maintain user experience. Use it when migrating from reCAPTCHA, debugging error codes, or implementing token validation and E2E tests.

View skill