feat: add packaged skill command and agent guidance#22
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
agent-terminal skillcommand that prints the packagedskills/agent-terminal/SKILL.md--jsonsupport for that command using the standard success envelopeWhy
Coding agents need an obvious, machine-friendly way to load the packaged
agent-terminalskill before they start driving session commands. This change keeps the skill as a single source of truth, makes it available directly from the installed CLI, and makes the help output explicitly steer agents toward the preloaded-skill-or-fallback-command workflow.User-facing behavior
agent-terminal skillnow prints the packaged skill markdown verbatim.agent-terminal skill --jsonnow returns the packaged skill content in the normal command envelope.agent-terminal --helpnow tells coding agents to use the preloadedagent-terminalskill when available, and otherwise callagent-terminal skillbefore other session commands.Validation
~/.local/bin/mise exec -- node ./node_modules/vitest/vitest.mjs run test/integration/cli.test.ts~/.local/bin/mise run ciProof / dogfood artifacts
/tmp/agent-terminal-skill-proof-iaWdon/tmp/agent-terminal-help-proof-BbEZjF/tmp/agent-terminal-skill-proof-iaWdon/skill-command.png,/tmp/agent-terminal-help-proof-BbEZjF/help-prominence.png/tmp/agent-terminal-skill-proof-iaWdon/skill-command.webm,/tmp/agent-terminal-help-proof-BbEZjF/help.webmFollow-up
runcompletion markers out of rendered terminal output📋 Implementation Plan
Plan: add a packaged-skill CLI command and advertise it in help
Decision and constraints
skills/agent-terminal/SKILL.mdat runtime; defer compile-time embedding/codegen.agent-terminal skillshould be usable by coding agents as a just-in-time skill loader.Verified repo facts that shape this plan
skills/agent-terminal/SKILL.mdalready exists and the published package already includesskills/via thepackage.jsonfileslist.src/cli/main.tsdoes not currently register askillcommand.import.meta.url(for example insrc/cli/commands/version.tsandsrc/renderer/bundledFont.ts), so the same pattern can load the skill from both source-tree runs and installed-package runs.../../../skills/agent-terminal/SKILL.mdfromsrc/cli/commands/skill.tsshould resolve correctly in both dev (src/...) and built (dist/...) layouts.Workstream 1 — implement the packaged-file loader and command contract
Files / symbols
src/cli/commands/skill.ts(new)src/util/assert.ts(reuse existing helpers only; no new abstraction unless needed)src/protocol/messages.tsand/orsrc/protocol/schemas.tsif the new JSON result belongs in the machine-facing protocol layer rather than command-local typesSteps
src/cli/commands/skill.tsthat reads:new URL('../../../skills/agent-terminal/SKILL.md', import.meta.url)readFile(..., 'utf8')agent-terminal skillprints the raw skill markdown to stdout with no banner/prefix so agents can ingest it directly.agent-terminal skill --jsonemits the normal success envelope and includes the exact skill content in the result.name,content, and optionally a simple source marker such assource: 'packaged-file'if that proves useful during implementation.Quality gate after Workstream 1
Workstream 2 — wire the command into the CLI and advertise it in help
Files / symbols
src/cli/main.tssrc/cli/output.ts(reuse existing output helpers if possible; avoid new output plumbing unless necessary)README.mdonly if the existing skill-install guidance becomes misleading after the new command landsSteps
skillcommand insrc/cli/main.ts.version,doctor) for action wiring and--jsonhandling.agent-terminal skill,agent-terminal skillbecomes the preferred retrieval path while the existing packaged-file copy flow remains documented as a fallback.Quality gate after Workstream 2
agent-terminal skillexits successfully and stdout exactly matchesskills/agent-terminal/SKILL.md.agent-terminal skill --jsonreturns a valid command envelope containing the same content.--helpoutput includes the new skill guidance.Workstream 3 — validation, dogfooding, and review artifacts
Automated validation
Run the narrowest relevant checks first, then the broader repo gates:
mise run format-checkmise run lintmise run typecheckmise run ci(fallback:npm run verifyifmiseis unavailable).Dogfooding setup
AGENT_TERMINAL_HOMEfor all manual CLI runs.npx tsx src/cli/main.ts ....Dogfooding scenarios
agent-terminal skill(or the repo-local equivalent during development).SKILL.mdbyte-for-byte.agent-terminal skill --jsonand verify the envelope plus embedded content.agent-terminal --helpand confirm the new guidance is easy to find without dominating the help text.Review artifacts / proof bundle
Create reviewer-friendly proof for the CLI change, ideally under a new
dogfood/bundle if maintainers want the evidence checked in:commands.shwith the exact dogfooding commands,agent-terminal skillandagent-terminal skill --json,If a checked-in dogfood bundle is unnecessary for this small change, still collect the screenshot and recording during verification so the reviewer can inspect what was exercised.
Acceptance criteria
agent-terminal skillexists as a top-level command.--jsonuses the standard CLI success envelope and includes the exact same skill content.import.meta.url; there is no handwritten duplicated copy of the skill in source.agent-terminal skill.Generated with
mux• Model:openai:gpt-5.4• Thinking:xhigh