agentleFS
aws-samplesaws-samples/sample-agentic-coding-harness-benchmarks/.claude/skills/implement/SKILL.md

implement

Skill14 starsChanged 57 days agoMIT-0View on GitHub

Implement code from an LLD spec using the current model. Reads the best LLD for a given problem, implements the code changes against the target repo, produces a unified diff, and captures detailed metrics (tokens, cache hits, wall-clock time, tool calls). Results go under benchmarks/swe-benchmark-data/{repo-name}/{problem-name}/implementations/{model-name}/. Used to compare how well different self-hosted models translate a design into working code.

  • Deletes or force-pushes

193 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use setup-ts-deep-modules, ask-matt and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • loulanyueSkill

    setup-ts-deep-modules

    Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files. User-invoked.

    Also in 17 projects that use this

  • AWSSkill

    ask-matt

    Ask which skill or flow fits your situation. A router over the skills in this repo.

    Also in 36 projects that use this

  • AWSSkill

    to-spec

    Turn the current conversation into a spec and publish it to the project issue tracker: no interview, just synthesis of what you've already discussed.

    Also in 75 projects that use this

  • ArvorCoSkill

    specify

    Create feature specification from natural language description. Use when starting a new feature or creating a spec. Triggers on: create spec, specify feature, new feature spec.

    Also in 12 projects that use this

  • qwlabsSkill

    claude-handoff

    Hand the current conversation off to a fresh background agent that picks up the work immediately.

    Also in 18 projects that use this

  • RoentekSkill

    loop-me

    Grill me about specs for the workflows I want to build, within this workspace.

    Also in 22 projects that use this

  • +5 more from aws

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. 0 are common, 13 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 175 edited versions we read keep these.

  • 13

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when the user wants to benchmark how well the current model can implement code from an existing Low-Level Design (LLD) …

    line 12
  2. Distinctive:

    Look at the system context for the active model id.

    line 32
  3. Very specific:

    If spec.md doesn't exist yet, ask the user which model's LLD to use as the spec, then copy it:

    line 54
  4. Very specific:

    Read spec.md in full. Pay attention to:

    line 77
  5. Distinctive:

    Do NOT skip any section. The LLD is your complete specification.

    line 84
  6. Distinctive:

    Test file locations and patterns

    line 94
  7. Distinctive:

    Create new files as specified

    line 102
  8. Distinctive:

    Follow the repo's existing code style exactly

    line 104
  9. Distinctive:

    Do NOT add anything not in the LLD

    line 106
  10. Distinctive:

    Do NOT skip anything in the LLD

    line 107
  11. Distinctive:

    Write all changes directly into the target repo working tree (we'll diff later).

    line 109
  12. Distinctive:

    Important: If the LLD references a dependency to install, note it but do NOT run package managers.

    line 111
  13. Distinctive:

    After all code is written, generate a unified diff:

    line 117
  14. Distinctive:

    Create the output directory and save all artifacts:

    line 167
  15. Distinctive:

    After saving artifacts, present:

    line 185

“Common” is measured: kept by at least 6 in 10 of the 175 edited versions of this file we could read. “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

Implement Skill

Use this skill when the user wants to benchmark how well the current model can implement code from an existing Low-Level Design (LLD) document. The LLD is the spec — the model's job is to produce the actual code changes.

This skill writes code. It reads the LLD, explores the target repo, writes the implementation files, and produces a unified diff. It does NOT run tests, deploy, or open PRs.

Workflow

  1. Gather Inputs — Detect model, confirm problem, locate LLD and target repo
  2. Read the LLD — Parse the spec completely before writing any code
  3. Explore Target Repo — Understand current code structure relevant to the LLD
  4. Implement — Write all code changes described in the LLD
  5. Generate Diff — Produce a unified diff of all changes against the base
  6. Capture Metrics — Record timing, tokens, cache stats
  7. Save Artifacts — Write everything to the output directory

Step 1: Gather Inputs

1.0 Detect and confirm the model

Look at the system context for the active model id. Derive a kebab-case folder name:

  • qwen3.6-35b → qwen3.6-35b
  • qwen3-coder-30b → qwen3-coder-30b
  • us.anthropic.claude-opus-4-6-v1 → claude-opus-4-6

Announce:

Implementing as {model-name}. Confirm or override.

1.1 Confirm the problem

Ask:

Which problem? (e.g. ssrf-hardening-outbound-url-validation)

Or accept if passed as parameter.

1.2 Locate the LLD

The LLD source is the best available lld.md for this problem. Look in:

benchmarks/swe-benchmark-data/{repo-name}/{problem-name}/implementations/spec.md

If spec.md doesn't exist yet, ask the user which model's LLD to use as the spec, then copy it:

benchmarks/swe-benchmark-data/{repo-name}/{problem-name}/{source-model}/lld.md
→ benchmarks/swe-benchmark-data/{repo-name}/{problem-name}/implementations/spec.md

1.3 Locate the target repo

The target repo lives at:

benchmarks/swe-benchmark-data/{repo-name}/repo/

Confirm it exists and check the git ref (should be clean, on main/tag).

1.4 Record start time

Note the wall-clock start time for metrics.


Step 2: Read the LLD

Read spec.md in full. Pay attention to:

  • File Changes section — which files to create/modify
  • Implementation Details — the actual logic described
  • Data Models — new types, schemas, interfaces
  • Configuration Parameters — new config/env vars
  • Dependencies — new packages needed

Do NOT skip any section. The LLD is your complete specification.


Step 3: Explore Target Repo

Based on the File Changes section of the LLD, read the current state of every file that will be modified. Understand:

  • Existing code patterns and style
  • Import conventions
  • Error handling patterns
  • Test file locations and patterns

Step 4: Implement

Work through the LLD's File Changes section systematically:

  1. Create new files as specified
  2. Modify existing files per the LLD's instructions
  3. Follow the repo's existing code style exactly
  4. Include all imports, type annotations, error handling described in the LLD
  5. Do NOT add anything not in the LLD
  6. Do NOT skip anything in the LLD

Write all changes directly into the target repo working tree (we'll diff later).

Important: If the LLD references a dependency to install, note it but do NOT run package managers. Just write the code.


Step 5: Generate Diff

After all code is written, generate a unified diff:

cd benchmarks/swe-benchmark-data/{repo-name}/repo/
git diff > /tmp/implementation.patch

Save the patch content. Then revert the working tree so the repo stays clean for the next model:

git checkout -- .
git clean -fd

Step 6: Capture Metrics

Record in metrics.json:

{
  "model": "{model-name}",
  "problem": "{problem-name}",
  "repo": "{repo-name}",
  "instance_type": "g6e.12xlarge",
  "instance_cost_per_hr": 10.49,
  "wall_clock_seconds": null,
  "task_cost_usd": null,
  "input_tokens": null,
  "output_tokens": null,
  "thinking_tokens": null,
  "cache_read_tokens": null,
  "cache_write_tokens": null,
  "tool_calls": null,
  "files_created": [],
  "files_modified": [],
  "diff_lines_added": null,
  "diff_lines_removed": null,
  "errors": 0,
  "timestamp": "{ISO 8601}"
}

Note: Token counts and cache stats will be filled in post-run by the metrics extraction script from the session JSONL. Fill in what you can observe directly: wall_clock_seconds, files_created, files_modified, diff stats, errors, timestamp.


Step 7: Save Artifacts

Create the output directory and save all artifacts:

benchmarks/swe-benchmark-data/{repo-name}/{problem-name}/implementations/{model-name}/
  diff.patch          ← the unified diff
  metrics.json        ← timing and stats
  implementation.md   ← brief notes on decisions made, deviations from LLD (if any)

The implementation.md should be SHORT (under 20 lines):

  • Files created/modified (list)
  • Any places where the LLD was ambiguous and you made a judgment call
  • Any parts of the LLD you could not implement and why

Summary Output

After saving artifacts, present:

## Implementation Complete

Model: {model-name}
Problem: {problem-name}
Files changed: {N} ({added} added, {modified} modified)
Diff: +{lines_added} -{lines_removed}
Wall clock: {seconds}s
Output: benchmarks/swe-benchmark-data/{repo-name}/{problem-name}/implementations/{model-name}/

Rules

  1. Spec is law — implement exactly what the LLD says, no more, no less
  2. Match repo style — follow existing patterns for imports, naming, error handling
  3. Clean working tree — always revert the repo after generating the diff
  4. No test execution — write test files if the LLD specifies them, but don't run them
  5. No package installs — note dependencies but don't install them
  6. One model, one run — each implementation is independent, no knowledge of other models' output

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.