AD

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.zip

Installs 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 + 调研 + 测试 + 文档),逐步指引
65 charsno explicit “when” trigger
Advanced

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

You give it
A request to add a new AI CLI tool target to `stdagent`.
You get back
A fully implemented, tested, and documented new target for `stdagent`.

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

<!-- Generated by stdagent dev. Source: .stdai/standards/skills/add-target/SKILL.md. Run `stdagent sync` to regenerate. Do not edit by hand. -->

加一个新 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.

SkillInstallsUpdatedSafetyDifficulty
add-target (this skill)017dReviewAdvanced
codex-skill124moReviewAdvanced
run-nx-generator52moReviewIntermediate
upgrading-expo33moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry