feature-worktree

feature-worktree is a skill for Codex from midFang/ai-agent-skills-workflow. It costs 96 tokens per session (880 once invoked), scanned A, original, MIT.

A workflow that takes a prepared feature specification, creates or restores a separate Git worktree and branch, and implements the feature there. It records validation results and builds an APK for human testing.

In plain words
What is it for?
Use it to develop a numbered feature from its specification, run available tests and checks, build a test APK, and leave the feature ready for human review.
Why use it?
It keeps feature work isolated from the main project and makes progress, evidence, and blockers explicit. This helps separate automated checks from the user’s final manual verification.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: $skill-name invocation.

Good fit Use it to develop a numbered feature from its specification, run available tests and checks, build a test APK, and leave the feature ready for human review.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/midfang/ai-agent-skills-workflow/feature-worktree
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add midFang/ai-agent-skills-workflow --skill feature-worktree
Clone the repo
git clone --depth 1 https://github.com/midFang/ai-agent-skills-workflow

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for feature-worktree

README.md
[![agentmods](https://agentmods.dev/badge/skills/midfang/ai-agent-skills-workflow/feature-worktree.svg)](https://agentmods.dev/skills/midfang/ai-agent-skills-workflow/feature-worktree)
Your own site
<a href="https://agentmods.dev/skills/midfang/ai-agent-skills-workflow/feature-worktree"><img src="https://agentmods.dev/badge/skills/midfang/ai-agent-skills-workflow/feature-worktree.svg" alt="Measured on agentmods" height="20"></a>
Per session 96 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 880 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00096 $0.00880
Opus 5 $0.00048 $0.00440
Sonnet 5 $0.00019 $0.00176
Haiku 4.5 $0.00010 $0.00088

Measured 7d ago against content hash 614b9affe6ad, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

feature-worktree scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

feature-worktree/SKILL.md · 114 lines

What it actually says

Feature Worktree

目的

一个 feature 对应一个分支、一个 worktree、一个 TASK 执行日志。

本 skill 负责:

领取 feature
-> 创建 worktree
-> 按 spec 开发
-> AI 自证验证
-> 构建待验证 APK
-> 等用户人工验证

合并和清理由 $feature-done 处理。

执行前检查

  1. 定位 features/<版本>/feature_list.json
  2. 找到指定 feature_id
  3. 读取 spec_filetask_file
  4. base repo 的业务代码必须是干净 git 状态:
    • 读取 git status --porcelain
    • issues/**/*.mdissues/**/*.csvfeatures/**/*.mdfeatures/**/*.csvfeatures/**/*.json 这类流程文件可以忽略。
    • 除上述流程文件外,只要存在未提交、未暂存或未跟踪文件,就停止,提醒用户先 commit、stash 或清理这些业务代码/配置改动。
    • 如果只存在可忽略流程文件,可以继续;在 TASK 或回复里说明本次忽略了哪些流程文件。
  5. worktree 文件夹名使用 feature_id,例如 /path/to/worktrees/FEAT-001

开发规则

  • 只做当前 feature。
  • 以 spec.md 的目标、主要行为、验收标准为准。
  • 如果 spec 明显缺关键事实,先标记 blockedneeds_info,不要脑补大方向。
  • 每次重要修改、方案选择、阻塞和验证结果都写入 TASK。
  • 本地提交 feature 时,commit message 使用中文需求描述:
    • 格式:<feature_id> feat: <中文需求描述或实现内容>
    • 中文描述优先取 spec 的“目标”,其次取 feature list 的 title / name / description
    • 示例:FEAT-001 feat: 增加沉浸式写作模式

AI 自证验证

AI 不能只说完成,必须自己验证并留下证据。

优先验证方式:

  • 单元测试
  • UI 测试
  • 构建 APK
  • 截图验证
  • 简单 adb 操作
  • 日志检查

TASK 必须记录:

验证计划
执行命令
结果
证据
不能验证的部分

如果验证失败,设置:

status=blocked
block_reason=<原因>

构建待验证 APK

AI 自证验证通过后:

  1. 构建 debug 或用户指定 APK。
  2. 复制到:
    • features/<版本>/apks/<feature_id>.apk
  3. 更新 feature_list.json
    • status=apk_built
    • commit
    • ai_verify_result=pass
  4. TASK 记录 APK 路径和验证摘要。

默认不安装 APK。用户需要人工验证时再决定安装方式。

收尾检查

每次结束前确认:

  • feature_list.json 状态已更新。
  • TASK 已记录本轮修改、验证、阻塞和下一步。
  • 已提交代码时记录 commit。
  • 有未提交改动时明确说明,不能静默留下半成品。

完成回复

报告:

  • feature_id
  • 状态
  • worktree
  • branch
  • commit
  • AI 验证结果
  • APK 路径
  • 需要用户验证什么
Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 114 lines · 96 tokens per session scan A 614b9affe6ad

Subscribe to this mod's changes

feature-worktree is a skill published in the GitHub repository midFang/ai-agent-skills-workflow (2 stars, last pushed 2mo ago), licensed MIT. It adds 96 tokens to every session and 880 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

axiom-shipping

Use when preparing ANY app for submission, handling App Store rejections, writing appeals, or managing App Store Connect. Covers submission checklists, rejection troubleshooting, metadata requirements, privacy manifests, age ratings, export compliance.

CharlesWiltgen/Axiom · 48 tokens

mobiai-create-pr

YOU MUST use this before ANY git push, branch push to remote, merge, or PR creation — regardless of phrasing or language. Covers all irreversible integration actions (committing, pushing, opening a PR, shipping finished work). Also triggers proactively after a fix when the user signals completion (still ask before…

ArisGuimera/MobiAI-Core · 75 tokens

mobiai-mobile-worktrees

You MUST use this before starting mobile work that needs isolation from the current workspace — new feature branches, parallel efforts, or any plan execution that should not contaminate the active tree. Do not create worktrees ad hoc; this skill enforces safe directory selection and verification.

ArisGuimera/MobiAI-Core · 60 tokens

mobiai-mobile-finishing-branch

You MUST use this once mobile implementation is finished and you are about to integrate the work — merging, pushing, opening a PR, or cleaning up the branch. Do not improvise the wrap-up; this skill gates verification, presents integration options, and handles cleanup.

ArisGuimera/MobiAI-Core · 61 tokens

asc-ad-hoc-distribution

Prepare, publish, resume, and verify private iOS release-testing installs with asc distribute. Use when distributing an IPA to registered devices outside TestFlight, reconciling ad hoc profiles, publishing through caller-owned S3-compatible storage, or diagnosing a resumable private distribution run.

rorkai/app-store-connect-cli-skills · 62 tokens

suede-play-release

Suede Labs Google Play delivery skill: ship an Android release end to end from the agent interface, without opening the Play Console. Set up credentials, upload an AAB, promote between tracks, stage or complete a rollout, push per-locale release notes, and prove against the Play Developer API what is actually live.…

JasonColapietro/suede-creator-skills · 200 tokens