agentleFS
srinidhis05srinidhis05/agentura/skills/incubator/pit-builder/SKILL.md

pit-builder

Skill9 starsChanged 9 months agoApache-2.0View on GitHub

NEVER produce a text-only response. Every single response you give MUST include at least one tool call (Bash, Write, Read, Edit, or Glob). If you want to explain what you're doing, include the explanation AND a tool call in the same response. A response with only text and no tool call will TERMINATE your execution immediately and the task will FAIL. This is a hard constraint of the runtime — not a suggestion. Your execution is ONLY successful when you…

  • Reads credentials
  • Deletes or force-pushes
  • Commits and pushes

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. About 0 are common, 8 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create a new "pit" (mini-project) in the backend-api Spring Boot backend repo from a structured spec.

    line 21
  2. Distinctive:

    Do ALL of the following in order.

    line 43
  3. Very specific:

    If backend_branch is provided: git checkout <backend_branch> Otherwise: git checkout -b feat/pit-<pit_name_hyphenated>

    line 52
  4. Distinctive:

    Read these files — they tell you HOW to build:

    line 57
  5. Very specific:

    Follow .claude/skills/pits/SKILL.md step by step:

    line 65
  6. Distinctive:

    If it fails, fix and rebuild.

    line 85
  7. Distinctive:

    Run these commands in sequence.

    line 92
  8. Very specific:

    NEVER hardcode GITHUB_TOKEN — use ${GITHUB_TOKEN} env var.

    line 147
  9. Distinctive:

    ALWAYS read harness docs before writing code.

    line 148
  10. Very specific:

    ALWAYS use @Timed on every controller endpoint.

    line 149
  11. Very specific:

    ALWAYS wrap responses in ApiEnvelope via EnvelopeUtil.

    line 150
  12. Distinctive:

    NEVER import from another pit's package.

    line 151
  13. Very specific:

    NEVER use tools.jackson — always com.fasterxml.jackson.

    line 152
  14. Very specific:

    ALWAYS use --force-with-lease when pushing.

    line 153
  15. Distinctive:

    NEVER produce a text-only response — always include a tool call.

    line 154

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Pit Builder Agent

MANDATORY EXECUTION RULE

NEVER produce a text-only response. Every single response you give MUST include at least one tool call (Bash, Write, Read, Edit, or Glob). If you want to explain what you're doing, include the explanation AND a tool call in the same response. A response with only text and no tool call will TERMINATE your execution immediately and the task will FAIL. This is a hard constraint of the runtime — not a suggestion.

Your execution is ONLY successful when you have written TASK_RESULT.json containing a valid pr_url. Any execution that ends without this file is a FAILURE.

Task

Create a new "pit" (mini-project) in the backend-api Spring Boot backend repo from a structured spec. Clone → read harness → create code → build → push → PR → report. All in one continuous flow.

Input Format

{
  "feature_name": "expense-tracker",
  "pit_name": "expense_tracker",
  "pit_name_hyphenated": "expense-tracker",
  "backend_spec": {
    "base_path": "/api/v1/expense-tracker",
    "endpoints": [...],
    "documents": [...],
    "properties": { "prefix": "expense-tracker", "fields": {...} }
  },
  "feedback": "(optional) PM feedback for refinement",
  "backend_branch": "(optional) existing branch name for refinement"
}

Execution — One Continuous Flow

Do ALL of the following in order. Do NOT stop between steps. Do NOT summarize between steps. After each step, immediately proceed to the next step's tool calls.

Step 1: Clone and branch

git clone https://x-access-token:${GITHUB_TOKEN}@github.com/your-org/backend-api.git /tmp/backend-api
cd /tmp/backend-api

If backend_branch is provided: git checkout <backend_branch> Otherwise: git checkout -b feat/pit-<pit_name_hyphenated>

Step 2: Read the harness (4 files max)

Read these files — they tell you HOW to build:

  1. CLAUDE.md
  2. DECISIONS.md (if exists)
  3. GUARDRAILS.md (if exists)
  4. .claude/skills/pits/SKILL.md

Step 3: Create all pit files

Follow .claude/skills/pits/SKILL.md step by step:

  1. Properties — @ConfigurationProperties(prefix = "<pit_name_hyphenated>")
  2. Config — @EnableConfigurationProperties
  3. ExceptionHandler — @ControllerAdvice scoped to projects.<pit_name>.controller
  4. Controller — @RequestMapping("<backend_spec.base_path>") with all endpoints
  5. Service — business logic for each endpoint
  6. DTOs — request/response for each endpoint
  7. Documents — @Document classes from backend_spec.documents
  8. Repository — MongoRepository interfaces
  9. application.yml — config under <pit_name_hyphenated>: namespace
  10. README.md — endpoint table and error codes

For refinement runs (backend_branch present), only change what feedback describes.

Step 4: Build — IMMEDIATELY after creating files, run:

cd /tmp/backend-api && ./gradlew build -x test

If it fails, fix and rebuild. Common issues:

  • Missing imports → check existing pits
  • Wrong Jackson imports → com.fasterxml.jackson, never tools.jackson
  • Cross-project imports → each pit is isolated

Step 5: Build, Push, and Deliver — ALL IN ONE FLOW

Run these commands in sequence. Do NOT stop between them. Execute everything in a single continuous bash session:

Once the build passes, IMMEDIATELY continue — do NOT summarize or stop:

cd /tmp/backend-api

# Commit and push
git add projects/<pit_name>/
git add src/main/resources/application.yml
git commit -m "feat: add <pit_name_hyphenated> pit — <one-line summary>"
git push --force-with-lease origin feat/pit-<pit_name_hyphenated>

# Create PR
gh pr create \
  --repo your-org/backend-api \
  --base pre-prod \
  --head feat/pit-<pit_name_hyphenated> \
  --title "feat: add <pit_name_hyphenated> pit" \
  --body "## Summary
Created <pit_name_hyphenated> pit from incubation spec.

### Endpoints
<table of endpoints from spec>

### Checklist
- [x] Properties with @ConfigurationProperties
- [x] Config with @EnableConfigurationProperties
- [x] ExceptionHandler scoped to project controllers
- [x] @Timed on every endpoint
- [x] Responses wrapped in ApiEnvelope
- [x] README.md with endpoint docs
- [x] ./gradlew build -x test passes
- [x] No cross-project imports

Generated by Agentura incubator pipeline."

Then IMMEDIATELY write TASK_RESULT.json with the PR URL:

cat > /home/worker/workspace/TASK_RESULT.json << 'RESULT_EOF'
{
  "success": true,
  "summary": "Created <pit_name_hyphenated> pit with N endpoints. PR: <pr_url>",
  "pr_url": "<the actual github PR url>",
  "branch": "feat/pit-<pit_name_hyphenated>",
  "endpoints_created": <count>,
  "files_created": ["list of files"]
}
RESULT_EOF

Guardrails

  • NEVER hardcode GITHUB_TOKEN — use ${GITHUB_TOKEN} env var.
  • ALWAYS read harness docs before writing code.
  • ALWAYS use @Timed on every controller endpoint.
  • ALWAYS wrap responses in ApiEnvelope via EnvelopeUtil.
  • NEVER import from another pit's package.
  • NEVER use tools.jackson — always com.fasterxml.jackson.
  • ALWAYS use --force-with-lease when pushing.
  • NEVER produce a text-only response — always include a tool call.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.