add-target
Provides a comprehensive workflow for extending stdagent with new CLI tool integration targets.
Install
mkdir -p .claude/skills/add-target && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/17967" && unzip -o skill.zip -d .claude/skills/add-target && rm skill.zipInstalls to .claude/skills/add-target
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
给 stdagent 新增一个 AI CLI 工具 target(transformer + 调研 + 测试 + 文档),逐步指引Key capabilities
- →Research target AI CLI tool APIs and constraints.
- →Implement a new transformer in `internal/transformer/`.
- →Register the new target in `internal/config/config.go`.
- →Add unit tests for the new target's functionality.
- →Update documentation for the new target across multiple files.
How it works
The skill guides the user through researching the target, implementing the transformer, registering the configuration, adding tests, and updating documentation for a new AI CLI tool target.
Inputs & outputs
When to use add-target
- →Add support for a new AI CLI tool
- →Implement new transformer for stdagent
- →Research tool integration constraints
- →Write unit tests for new targets
About this skill
加一个新 target
stdagent 的扩展点是 internal/transformer/:每个 AI CLI 工具一个 .go 文件,实现 Plan(docs, cfg) (*Plan, error)。本 skill 给你完整的加 target 工作流。
触发场景
- 用户提到"加 X 工具"、"支持 Y AI CLI"
- 看到 docs/targets/ 出现新的 .md 但 internal/transformer/ 还没对应实现
- 收到 issue 请求新 target
流程
1. 调研先行(必须)
在 docs/targets/ 写一份调研 docs/targets/<kebab-name>.md,覆盖:
- 工具官方仓库 + 主页 URL
- 它读哪些路径(根文件名 + 子目录约定)
- frontmatter 字段方言(applyTo / globs / type 字段是否有特殊形式)
- 字节 / 字符上限(如有,记 SOFT 与 HARD 两档)
- 注入 marker 是否允许(comment vs frontmatter,对该工具有没有反作用)
- skill / command / subagent 概念是否原生支持,对应路径
调研不充分就动代码:一定踩坑。
2. 实现 transformer
新文件 internal/transformer/<name>.go:
package transformer
import (
"std-agent/internal/config"
"std-agent/internal/parser"
"std-agent/internal/writer"
)
type fooTransformer struct{}
func init() { Register("foo", &fooTransformer{}) }
func (t *fooTransformer) Plan(docs []*parser.Document, cfg *config.Config) (*writer.Plan, error) {
plan := &writer.Plan{Target: "foo"}
// ... fan out 逻辑
return plan, nil
}
参考最简的 aider.go(reuse AGENTS.md,noop)或最复杂的 claude_code.go(root + .claude/rules/ + skills + commands + subagents + mcp)。
3. config 注册
internal/config/config.go 已经按 map 加载,无需改。但 internal/cli/init_assets/ 的样板 config 与 README*.md 的 target 列表要加。
4. 测试
最低门槛:internal/transformer/smoke_test.go 里加一个 case,断言 Plan 返回非空 + 关键 path 出现。建议加专门的 <name>_test.go 覆盖 rules / skills / commands 各 type 的 fanout。
5. 文档
- README 6 个语言版本的 Tier 1 / Tier 2 表格加一行
- docs/conversion-rules.md 加列
- docs/spec.md Part 2 加章节(如果 frontmatter 方言独特)
6. 验证
# 在仓库自己的 .stdai/ 里开启新 target,跑 sync 看真实产物
mise run build
./bin/stdagent sync --target=<new-name>
ls -la .<new-name>/ # 或对应的根文件
已实现的 23 个 target(参考实现深度)
| target | 实现复杂度 | 参考 |
|---|---|---|
| aider | 极简(reuse AGENTS.md) | aider.go |
| antigravity | 简单 | antigravity.go |
| cline | 中等(数字前缀文件名排序) | cline.go |
| continue.dev | 中等 | continue.go |
| codex | 中(spillover 处理) | codex.go |
| copilot | 中(applyTo -> .instructions.md) | copilot.go |
| cursor | 中(.mdc frontmatter 方言) | cursor.go |
| gemini | 简单(GEMINI.md + commands toml) | gemini.go |
| opencode | 简单 | opencode.go |
| windsurf | 中(rules/skills/workflows 分目录) | windsurf.go |
| claude-code | 高(subagents / skill packages / mcp) | claude_code.go |
入门读 aider + gemini,进阶读 cursor + copilot,全功能读 claude_code。
<!-- /Generated by stdagent -->When not to use it
- →When the task is not about adding a new AI CLI tool target to `stdagent`.
- →When the user wants to implement code without prior research.
- →When the user wants to skip testing or documentation for a new target.
Limitations
- →The skill focuses on adding targets to `stdagent`.
- →The skill requires thorough research before code implementation.
How it compares
This skill provides a structured workflow for integrating new AI CLI tools into `stdagent`, ensuring all necessary steps from research to documentation are covered, unlike ad-hoc integration.
Compared to similar skills
add-target side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| add-target (this skill) | 0 | 17d | Review | Advanced |
| codex-skill | 12 | 4mo | Review | Advanced |
| run-nx-generator | 5 | 2mo | Review | Intermediate |
| upgrading-expo | 3 | 3mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
codex-skill
feiskyer
Use when user asks to leverage codex, gpt-5, or gpt-5.1 to implement something (usually implement a plan or feature designed by Claude). Provides non-interactive automation mode for hands-off task execution without approval prompts.
run-nx-generator
nrwl
Run Nx generators with prioritization for workspace-plugin generators. Use this when generating code, scaffolding new features, or automating repetitive tasks in the monorepo.
upgrading-expo
sickn33
Upgrade Expo SDK versions
wox-plugin-creator
Wox-launcher
Create and scaffold Wox plugins (nodejs, python, script-nodejs, script-python). Use when cloning official SDK templates, generating script plugin templates, or preparing plugins for publish.
github-script
githubnext
Best practices for writing JavaScript code for GitHub Actions using github-script
write-script-bunnative
windmill-labs
MUST use when writing Bun Native scripts.