feat: add @tsops/skill — Claude Skill for tsops (with npm installer)#54
feat: add @tsops/skill — Claude Skill for tsops (with npm installer)#54Pom4H wants to merge 1 commit into
Conversation
Ships the canonical Skill content at skills/tsops/ and a thin npm
package (@tsops/skill) that installs it into ~/.claude/skills/tsops or
./.claude/skills/tsops. After install, Claude Code, the Agent SDK, and
any other tool implementing the Agent Skills standard load the Skill
automatically when relevant.
Why a Skill, not just docs: the docs explain what tsops is. The Skill
tells an agent how to operate it without violating the load-bearing
rules — no internal URLs in env vars, always run `tsops plan` before
deploy, always `tsc --noEmit` after a rename, never `--no-verify` past
secret validation. Without the Skill, an LLM agent reaches for
BACKEND_URL=http://api:3000 because that pattern is everywhere else
on the public internet. With it, it reaches for config.url('api', 'service').
Distribution model (mirrors workflows-sdk.dev structure):
- canonical source on GitHub at skills/tsops/
- npm package @tsops/skill that installs the Skill via `npx @tsops/skill install`
- docs page at docs/guide/skill.md
Skill structure:
skills/tsops/
├── SKILL.md entry point — frontmatter + hard rules
├── reference/
│ ├── commands.md CLI flags
│ ├── runtime-helpers.md config.url / config.env / config.dns
│ ├── secrets.md secret validation, cluster fallback
│ └── preview-overlays.md overlay namespace lifecycle
└── examples/
├── add-app.md recipe
├── rename-app.md recipe — compiler-driven rename
└── add-secret.md recipe
Package structure (packages/skill/):
- bin/install.mjs — `tsops-skill install [--user|--project] [--force]`,
plus uninstall and where subcommands
- scripts/sync-skill.mjs — build step that copies skills/tsops/ into
packages/skill/skill/ for the npm tarball
(npm doesn't preserve symlinks reliably)
- README.md — install + verify + uninstall instructions
This PR is strictly additive — no existing files are modified, so no
conflict with the in-flight docs refresh in PR #51.
Follow-ups (separate small PRs after both merge):
- surface /guide/skill in the docs sidebar
- add a "Use with Claude" link from the main README
- submit to anthropics/skills community registry if/when accepted
arhebs
left a comment
There was a problem hiding this comment.
Thanks, direction looks good. I verified the important package paths:
tsops-skill installworks for user install.tsops-skill install --projectworks.pnpm --filter @tsops/skill packincludes the expected skill files.- Canonical
skills/tsopsand packagedpackages/skill/skillmatch.
Two small blockers before I’d merge:
-
skills/tsops/SKILL.mdandpackages/skill/skill/SKILL.mdreferenceexamples/hybrid-vercel-k8s.md, but that file is not present in either skill copy. Please add the example or remove the reference. -
packages/skill/package.jsonhas"lint": "pnpm -w exec eslint .", but the repo uses Biome and ESLint is not installed.pnpm --filter @tsops/skill lintcurrently fails withCommand "eslint" not found. Please switch this to Biome or remove the package-local lint script.
CI is also red on root pnpm lint; from the logs it looks like repo-level Biome config/schema drift and existing diagnostics, not this PR specifically, but it should be green before merge.
Summary
Adds
@tsops/skill— a Claude Skill that teaches Claude how to operate tsops correctly. Ships the canonical Skill content atskills/tsops/and a thin npm installer package.After install, Claude Code, the Agent SDK, and any tool implementing the Agent Skills standard load the Skill automatically when relevant.
Why a Skill, not just docs
The docs explain what tsops is. The Skill tells an agent how to operate it without violating the load-bearing rules:
config.url('api', 'service').tsops planbeforetsops deploy.tsops.config.ts, runtsc --noEmitso renames propagate to every caller.--no-verifypast secret validation.Without the Skill, an LLM agent reaches for
BACKEND_URL=http://api:3000because that pattern is everywhere else on the public internet. With the Skill, it reaches forconfig.url('api', 'service').This compounds with the value tsops already provides: a typed operational model is one an agent can safely modify provided it knows the conventions. The Skill is how those conventions get transferred.
Distribution model
skills/tsops/— edited via PR review like any other code@tsops/skill— one-shotnpx @tsops/skill installcopies the Skill into~/.claude/skills/tsops(user scope) or./.claude/skills/tsops(project scope, commit to repo)docs/guide/skill.mdA user installs with one command:
The installer is idempotent, supports
--forceoverwrite,uninstall, andwheresubcommands.Skill structure
The Skill is intentionally small. The entry-point
SKILL.mdcovers the mental model and the hard rules — Claude reads this on session start to decide if the Skill is relevant. References underreference/andexamples/load on demand, only when the current task touches them.Package structure
The duplication between
skills/tsops/(canonical) andpackages/skill/skill/(bundled) exists because npm tarballs do not preserve symlinks reliably across all package managers. The build step keeps them in sync.Verified
npx @tsops/skill installwrites correct content under~/.claude/skills/tsops/tsops.config.tsfiles,tsopsCLI mentions, and operational verbs (deploy, plan, preview)Scope
Strictly additive — no existing files are modified, zero conflict risk with PR #51 (docs refresh) or #52 (RFC + Vercel skeleton). Mergeable in any order.
Follow-ups (separate small PRs after merge)
/guide/skillin the docs sidebar (one line indocs/.vitepress/config.ts)Test plan
npx @tsops/skill install --help— usage printsnpx @tsops/skill install --user— files appear under~/.claude/skills/tsops/npx @tsops/skill install --project— files appear under./.claude/skills/tsops/npx @tsops/skill where— prints target path + (in)stalled statenpx @tsops/skill uninstall— removes target dir cleanlyexamples/add-app.md(usesconfig.url, runstsops planbefore deploy)