add_smart_capability
暂无简介
- License 许可
- MIT
- 最近更新
- 2026-10-30
- Stars
- ★ 1
- Forks
- 0
02 资源文件 7
- 脚本__init__.py—
- 其他add_smart_capability.md.liquid6.0 KB
- 脚本capability.py8.8 KB
- 其他fix_checks.md.liquid900 B
- 其他output_message.md.liquid703 B
- 参考文档references/code-patterns.md4.5 KB
- 参考文档references/timezone-index.md4.3 KB
03 SKILL.md 正文
add-smart-capability extends a smart tool that already exists: an agent reads the tool,
implements one model-backed capability in its library, exposes it from the CLI, writes the
tests and the docs, then runs the tool's own checks (uv run pytest, the conformance kit,
and prek run --all-files when prek is installed) and fixes what they report. Nothing is
committed; the working tree is left for you to review.
smart-tool-creator add-smart-capability \
"Given an incident id, fetch its chat transcript and alert timeline from the incident platform and draft a blameless postmortem: summary, impact, contributing factors, and action items with owners" \
--directory ~/src/incident-postmortem \
--context "The platform client is src/incident_postmortem/platform.py; fetch through it, never call the API directly" \
--context "Our postmortem template is at ~/notes/postmortem-template.md; match its headings"
from pathlib import Path
from smart_tool_creator.lib import add_smart_capability
added = add_smart_capability(
"Given an incident id, fetch its chat transcript and alert timeline from the incident platform "
"and draft a blameless postmortem: summary, impact, contributing factors, and action items with owners",
directory=Path("~/src/incident-postmortem").expanduser(),
context=[
"The platform client is src/incident_postmortem/platform.py; fetch through it, never call the API directly",
"Our postmortem template is at ~/notes/postmortem-template.md; match its headings",
],
)
added.report, added.checks, added.fix_rounds, added.output_message
Arguments
REQUEST: the whole brief for one capability: what it does, for whom, and what it takes in and gives back. Required.--directory PATH: the smart tool to work in; the current directory when omitted. It must hold asmart-tool.jsonat its root, and no parent is searched, so a workspace holding several tools is never extended by accident. It must also have anIntelligenceinterface atsrc/<package>/intelligence/interface.pyfor the capability to run through, which a tool scaffolded with--no-agent-providersdoes not.--context TEXT: repeatable free text, usually paths to notes, transcripts, or exemplars the agent should read before it designs anything. It reads the paths itself, so name them rather than pasting their contents.--agent-provider: what the agent runs through,{{ agent_providers | join: "or" }}. The first installed, in that order, when omitted.--model: the model the agent runs on: a Copilot model id forcopilot,<provider>/<model>foramplifier-agent(for instance{{ default_intelligence_models["amplifier-agent"] }}), a Codex model id forcodex, a Claude model id forclaude. Defaults to{{ default_intelligence_models.copilot }}oncopilot,{{ default_intelligence_models["amplifier-agent"] }}onamplifier-agent,{{ default_intelligence_models.codex }}oncodex, and{{ default_intelligence_models.claude }}onclaude.--reasoning-effort: how hard the model thinks before it acts, one oflow,medium,high,xhigh,max. Defaults to{{ default_intelligence_reasoning_effort }}. Applies to thecopilot,codex, andclaudeagent providers.intelligence, library only: theIntelligenceimplementation the agent runs through, which wins overagent_provider;resolve_intelligence(agent_provider)when omitted. Tests inject a fake.
Result
AddedCapability carries root, the extended tool's distribution root; report, the
agent's final message, which names the capability, the files it touched, the command to try
it, and its caveats; checks, one entry per check with its name, command, status
(passed, failed, or skipped), and the tail of its output when it failed or the reason
when it was skipped; fix_rounds, the extra agent runs spent on failing checks, at most 2;
and output_message, all of that for the calling agent, which is what the CLI prints.
The prek check is skipped, never failed, when the tool has no .pre-commit-config.yaml or
prek is not on PATH; the conformance check is skipped when the kit itself could not run,
and names the failing rules when it fails. A check still failing when the work stops is returned rather than
raised and named in the message, and the CLI exits 1; the work stays in the tool's working
tree either way, and what it is worth is the caller's call.
04 同仓库更多 Skills
init
暂无简介
check_spec_adherence
暂无简介
check_conformance
暂无简介
smart-tool-creator
Create, validate, and evaluate smart tools that follow the Amplifier Smart Tool Spec, by driving the smart-tool-creator smart tool from a CLI, a library, or an agent. Use when (1) packaging domain expertise as a standalone tool any agent can call, (2) checking an existing smart tool against the spec and its conformance kit, (3) measuring how well a smart tool's model-backed capabilities work. Triggers on "smart tool", "smart-tool-creator", "amplifier smart tool", "conformance kit", "SMART_TOOL.md", "smart-tool.json".