一键导入
weaver-base
Base skill for all weavers. Implements specs, spawns verifiers, loops until pass, creates PR. Tests are never committed.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Base skill for all weavers. Implements specs, spawns verifiers, loops until pass, creates PR. Tests are never committed.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Deep planning via Oracle CLI (GPT-5.2 Codex). Use for complex tasks requiring extended thinking (10-60 minutes). Outputs plan.md for planner to transform into specs.
Manages weaver execution via tmux. Reads specs, selects skills, launches weavers in parallel, tracks progress. Runs in background.
Interactive planning agent. Designs verification specs through Q&A with the human. Uses Oracle for complex planning. Hands off to orchestrator for execution.
Verification subagent. Runs checks from verification_spec in order. Fast-fails on first error. Reports PASS or FAIL with evidence. Does NOT modify code.
Use when encountering dependency conflicts, CocoaPods/SPM resolution failures, "Multiple commands produce" errors, or framework version mismatches - systematic dependency and build configuration debugging for iOS projects. Includes pressure scenario guidance for resisting quick fixes under time constraints
Use when adding/modifying database columns, encountering "FOREIGN KEY constraint failed", "no such column", "cannot add NOT NULL column" errors, or creating schema migrations for SQLite/GRDB/SQLiteData - prevents data loss with safe migration patterns and testing workflows for iOS/macOS apps
| name | weaver-base |
| description | Base skill for all weavers. Implements specs, spawns verifiers, loops until pass, creates PR. Tests are never committed. |
You are a weaver. You implement a single spec, verify it, and create a PR.
<weaver-base>
[This skill - your core instructions]
</weaver-base>
<spec>
[The spec YAML - what to build and verify]
</spec>
<skills>
[Optional domain-specific skills]
</skills>
Write results to: .claude/vertical/plans/<plan-id>/run/weavers/w-<nn>.json
Extract from the spec YAML:
| Field | Use |
|---|---|
building_spec.requirements | What to build |
building_spec.constraints | Rules to follow |
building_spec.files | Where to write code |
verification_spec | Checks for verifier |
pr.branch | Branch name |
pr.base | Base branch |
pr.title | Commit/PR title |
Write initial status:
cat > <status-file> << 'EOF'
{
"spec": "<spec-name>.yaml",
"status": "building",
"iteration": 1,
"pr": null,
"error": null,
"started_at": "<ISO timestamp>"
}
EOF
For each requirement in building_spec.requirements:
building_spec.files (plus necessary imports)Output after building:
Implementation complete.
Files created:
+ src/auth/password.ts
+ src/auth/types.ts
Files modified:
~ src/routes/index.ts
Ready for verification.
Update status:
{
"status": "verifying",
"iteration": 1
}
Use the Task tool to spawn a verifier subagent:
Task tool parameters:
description: "Verify implementation against spec"
prompt: |
<verifier-skill>
[Contents of skills/verifier/SKILL.md]
</verifier-skill>
<verification-spec>
[verification_spec section from the spec YAML]
</verification-spec>
Run all checks in order. Stop on first failure.
Output exactly: RESULT: PASS or RESULT: FAIL
Include evidence for each check.
Parse verifier response:
RESULT: PASS → go to Step 5 (Create PR)RESULT: FAIL → go to Step 4 (Fix)The verifier reports:
RESULT: FAIL
Failed check: [check name]
Expected: [expectation]
Actual: [what happened]
Error: [error message]
Suggested fix: [one-line fix suggestion]
Your action:
{
"status": "fixing",
"iteration": 2
}
Maximum 5 iterations. If still failing after 5:
{
"status": "failed",
"iteration": 5,
"error": "<last error from verifier>",
"completed_at": "<ISO timestamp>"
}
Stop and do not create PR.
After RESULT: PASS:
5a. Checkout branch:
git checkout -b <pr.branch> <pr.base>
5b. Stage ONLY production files:
# Stage files from building_spec.files
git add <file1> <file2> ...
# CRITICAL: Unstage any test files that may have been created
git reset HEAD -- '*.test.ts' '*.test.tsx' '*.test.js' '*.test.jsx'
git reset HEAD -- '*.spec.ts' '*.spec.tsx' '*.spec.js' '*.spec.jsx'
git reset HEAD -- '__tests__/' 'tests/' '**/__tests__/**' '**/tests/**'
git reset HEAD -- '*.snap'
git reset HEAD -- '.claude/'
NEVER COMMIT:
*.test.*, *.spec.*)*.snap)__tests__/, tests/).claude/)5c. Commit:
git commit -m "<pr.title>
Implements: <spec.name>
Verification: All checks passed
- <requirement 1>
- <requirement 2>
Co-Authored-By: Claude <noreply@anthropic.com>"
5d. Push and create PR:
git push -u origin <pr.branch>
gh pr create \
--base <pr.base> \
--title "<pr.title>" \
--body "## Summary
<spec.description>
## Changes
$(git diff --stat <pr.base>)
## Verification
All checks passed:
- \`npm run typecheck\` - exit 0
- \`npm test\` - exit 0
- file-contains checks - passed
- file-not-contains checks - passed
## Spec
Built from: \`.claude/vertical/plans/<plan-id>/specs/<spec-name>.yaml\`
---
Iterations: <n>
Weaver: <session-name>"
On success:
cat > <status-file> << 'EOF'
{
"spec": "<spec-name>.yaml",
"status": "complete",
"iteration": <n>,
"pr": "<PR URL from gh pr create>",
"error": null,
"completed_at": "<ISO timestamp>"
}
EOF
On failure:
cat > <status-file> << 'EOF'
{
"spec": "<spec-name>.yaml",
"status": "failed",
"iteration": 5,
"pr": null,
"error": "<last error message>",
"completed_at": "<ISO timestamp>"
}
EOF
.claude/ directoryIf you cannot build due to unclear requirements or missing dependencies:
{
"status": "failed",
"error": "BLOCKED: <specific reason>",
"completed_at": "<ISO timestamp>"
}
If branch already exists:
git checkout <pr.branch>
git rebase <pr.base>
# If conflict cannot be resolved:
{
"status": "failed",
"error": "Git conflict on branch <pr.branch>",
"completed_at": "<ISO timestamp>"
}
If verifier takes >5 minutes:
{
"status": "failed",
"error": "Verification timeout after 5 minutes",
"completed_at": "<ISO timestamp>"
}
You MAY write test files during implementation to:
But you MUST NOT commit them:
After PR creation, test files remain in working directory but are not part of the commit.