Plugins for one shot prompting

version
0.5.1
GitHub stars
13

Install

/plugin install one-shot@llm-plugins

Run it inside Claude Code after adding the marketplace with /plugin marketplace add pbdeuchler/llm-plugins.

Contents

Discovered from source

Skills 2

Executing an Implementation Plan

Execute an implementation plan. The goal here is very high quality code, architecture, and design. Split the implementation plan into no more than 5 steps. Flesh out each step as if you were passing it to a junior developer. If the plan is too big or too ill defined to effectively accomplish your task in 5 steps or less with a very high bar of quality immediately exit. Report why with some recommendations on how to improve the plan.

Core principle: Read one step → execute implementation → write tests → code review → move to next step.

REQUIRED SKILL: requesting-code-review - The review loop (dispatch, fix, re-review until zero issues)

Overview

When NOT to use:

  • No implementation plan exists yet (use writing-implementation-plans first)

MANDATORY: Dispatching subagents

Before dispatching any subagent:

  • Briefly explain (2-3 sentences) what you're asking the agent to do
  • State which step this covers
  • Ensure the subagent has all required context

When the subagent returns: The user cannot see subagent output unless you show them. If it seems important or relevant print out a summary or, if small enough, the entire output for the user. A key deciding factor of whether or not to show the user subagent is if the output is important, but will not show up in the ending implementation artifact (and thus will not be seen by the user). Take note not to waste tokens or processing time outputting minutae or irrelevant details that the user will either not care about or see eventually when they review the code.

REQUIRED: Implementation Plan Path

DO NOT GUESS. If the user has not provided a path to an implementation plan, you MUST ask for it.

Use AskUserQuestion:

Question: "Which implementation plan should I execute?"
Options:
  - [list the newest plan files you find in docs/plans/]
  - "Let me provide the path"

If docs/plans/ doesn't exist or is empty, ask the user to provide the path directly.

Never assume, infer, or guess which plan to execute. The user must explicitly tell you.

The Process

1. Create Phase-Level Task List

Think deeply about what's being asked of you. The final result of this implementation should be SIMPLE, CLEAN, and ELEGANT. Code should be easy to read, very maintainable, easily testable, and deeply thought through. Code should never be written for the sake of writing it, every LoC should have a strong purpose. Always bias towards refactoring or removing code before implementing net new. Do not implement one off solutions, make things as general as reasonable. If you do need to implement net new code think in terms of building blocks instead of purpose specific, tightly coupled glue code. Implement for the future as well as right now, never code yourself into a corner, ensure code architecture is extensible and flexible, and do your best to leave the codebase better than how you found it.

MANDATORY: Your implementation taks list should be optimally ordered so that not only are the steps logical and increasing in complexity, first creating foundational building blocks or required underlying logic, but also so that context is managed as effeciently as possible. If there is a step you can do independently, or something you can implement that you will later treat as a black box, order those steps earlier so that they can be summarized or removed from context for later steps.

Use TaskCreate to create three task entries per step (or TodoWrite in older Claude Code versions). The first task entry per step should be implementation, the second should be testing and verification, the third should be code review:

- [ ] Step 1a: Implement base types
- [ ] Step 1b: Write tests
- [ ] Step 1c: Code review
- [ ] Step 2a: Implement hot path
- [ ] Step 2b: Write tests
- [ ] Step 2c: Code review
...

Why absolute paths in task entries: After compaction, context may be summarized. The absolute path in the task entry ensures you always know exactly which file to read.

Why include the title: Gives visibility into what each phase covers without loading full content.

2. Execute

For each step, follow this cycle:

2a. Implement the task

Mark "Step Na: Implementation" as in_progress and dispatch task-implementer to begin.

<invoke name="Task">
<parameter name="subagent_type">one-shot:task-implementer</parameter>
<parameter name="description">Implementing Step X, Task Y: [description]</parameter>
<parameter name="prompt">

... fleshed out prompt goes here ...

</parameter>
</invoke>
2b. Write tests and verify correctness

Mark "Step Nb: Tests and Verification" as in_progress and dispatch task-implementer to begin.

<invoke name="Task">
<parameter name="subagent_type">one-shot:task-implementer</parameter>
<parameter name="description">Writing tests for Step X, Task Y: [description]</parameter>
<parameter name="prompt">

... fleshed out prompt goes here ...

</parameter>
</invoke>
2c. Code Review for Step

Mark "Step Nc: Code review" as in_progress.

MANDATORY: Use the requesting-code-review skill for the review loop.

Context to provide:

  • WHAT_WAS_IMPLEMENTED: Summary of all tasks in this phase
  • PLAN_OR_REQUIREMENTS: All tasks from this phase
  • BASE_SHA: commit before phase started
  • HEAD_SHA: current commit

If code reviewer returns a context limit error:

The phase changed too much for a single review. Chunk the review:

  1. Identify the midpoint of tasks in the phase
  2. Run code review for first half of tasks (commits for tasks 1 through N/2)
  3. Fix any issues found
  4. Run code review for second half of tasks (commits for tasks N/2+1 through N)
  5. Fix any issues found

When issues are found, dispatch task-implementer with the feedback:

<invoke name="Task">
<parameter name="subagent_type">one-shot:task-implementer</parameter>
<parameter name="description">Fixing review issues for Step X</parameter>
<parameter name="prompt">
  Fix issues from code review for Step X.

  Original prompt: [implementation step prompt]

  Code reviewer found these issues:
  [list all issues - Critical, Important, and Minor]

  Read the phase file to understand the tasks and context.

  Your job is to:
  1. Understand root cause of each issue
  2. Apply fixes systematically (Critical → Important → Minor)
  3. Verify with tests/build/lint
  4. Commit your fixes
  5. Report back with evidence

  Fix ALL issues — including every Minor issue. The goal is ZERO issues on re-review.
  Minor issues are not optional. Do not skip them.
</parameter>
</invoke>

After task-implementer completes the fixes, re-review per the requesting-code-review skill. Continue loop until zero issues.

Plan execution policy (stricter than general code review):

  • ALL issues must be fixed (Critical, Important, AND Minor)
  • Ignore APPROVED/BLOCKED status - count issues only
  • Three-strike rule: If same issues persist after three review cycles, stop and report the issue

Minor issues are NOT optional. Do not rationalize skipping them with "they're just style issues" or "we can fix those later." The reviewer flagged them for a reason. Fix every single one.

Exit condition: Zero issues in all categories — including Minor.

Mark "Step Nc: Code review" as complete.

MANDATORY: After finishing the code review section of each task intelligently compact your context. The goal here is to constantly prune context overtime, not neccessarily completely rebuild it. NOT PRUNING ANY CONTEXT IS A FAILURE THAT SHOULD BE REPORTED TO THE USER. Even if you prune 5% of context, that is desireable. Since you are an advanced LLM you should have some idea of what you have left to do in this session, use that intelligence to understand what is neccessary in your context for the future and what isn't.

Common Thought Patterns When Smart Compacting - STOP

DoBecause
"I'm done interacting with that 3rd party dependency. I can summarize anything related."You should have properly sequenced the implementation steps to ensure that dealing with this 3rd party dep is contained to only one implementation step.
"There's a lot of tool calls here, I can remove any that didn't lead to a change"There's no reason to keep tool calls or their results around if they don't inform you why or how you did something important.
"I'm done working on this piece of code, I should keep it around since it'll be called later"As you build your implementation core pieces of code will be needed to inform your future work
Don'tBecause
"This core code file is taking up a lot of context, pruning it will be an easy win and I can re-read it later"Re-reading files wastes context. If you are unsure about the future use of a large file summarize it as an AST index to aid future content reads
"I have to prune something, but everything is valuable"This is never true, unless you have planned and executed everything perfectly.
"I can reason about this central concept from the beginning in the future, no need to keep it around"Anything core to your implementation, planning process, or reasoning for why you're doing something should be kept

3. Move to Next Step

Repeat step 2 (2a → 2b → 2c) for each remaining step.

4. Update Project Context

After all phases complete, invoke a subagent to review changes and update README.md and AGENTS.md files if needed.

<invoke name="Task">
<parameter name="subagent_type">one-shot:task-implementer</parameter>
<parameter name="description">Updating project context after implementation</parameter>
<parameter name="prompt">
  Review what changed during this implementation and update README.md and AGENTS.md files if contracts or structure changed.

  Base commit: <commit SHA at start of first phase>
  Current HEAD: <current commit>
  Working directory: <directory>

  1. Diff against base to see what changed
  2. Identify contract/API/structure changes
  3. Update any files that might aid in future development
  4. Commit documentation updates

  Report back with what was updated (or that no updates were needed).
</parameter>
</invoke>

If subagent reports updates: Review the changes, then proceed to final review. If subagent reports no updates needed: Proceed to final review.

5. Complete Development

After implementation is complete:

  • Provide a report to the human operator

    • For each step:
      • How many tasks were implemented
      • How many review cycles were needed
      • Any compromises made (there should be NO compromises, but if any were made). Examples:
        • "I couldn't run the integration tests, so I continued on"
        • "I couldn't generate the client because the dev environment was down"
        • Note that these are PARTIAL FAILURE CASES and explain to the user what the user must do now.
      • Were any code-review issues left outstanding at any point?
  • Push the branch to remote origin.

Common Rationalizations - STOP

ExcuseReality
"I'll review after each task to catch issues early"No. Review once per step. Task-level review wastes context.
"Context error on review, I'll skip the review"No. Chunk the review into halves. Never skip review.
"Minor issues can wait"No. Fix ALL issues including Minor.

Holistic Review

Perform a holistic code review by routing to the best available review backend. The review methodology itself lives in the house-style:holistic-review skill -- this skill only decides where it runs. Prefers codex:rescue when available; falls back to a direct subagent.

Required Context

You should have two pieces of information before invoking this skill:

  • Implementation plan path -- absolute path to the plan file
  • Base branch -- the branch or commitish to diff against (everything between base and HEAD is in scope)

If the plan path is missing, stop and ask. If the base branch is missing, the reviewer will resolve it (origin/HEAD, else main/master) -- pass it through as "not provided".

Dependency Gate

This skill requires the house-style plugin. Scan your available skills list for house-style:holistic-review. If it is not present, stop and report that the house-style plugin must be installed (/plugin install house-style@llm-plugins).

Detection Gate

Before doing anything else, determine whether codex:rescue is available.

Scan your available skills/commands list (shown in your system context) for codex:rescue. Record the result explicitly in your response:

codex:rescue: AVAILABLE / NOT AVAILABLE

You MUST write this line before proceeding. Do not skip it.

Routing

If AVAILABLE: use codex:rescue

This is the primary path. You may not skip it when codex:rescue is available. Falling through to the fallback path when codex:rescue is detected is a failure.

  1. Resolve the fully qualified path of the house-style skill file:

    find ~/.claude/plugins -path '*house-style*skills/holistic-review/SKILL.md' -print -quit
    

    If nothing is found, fall back to the subagent path below.

  2. Invoke SkillTool("/codex:rescue --fresh --foreground "{prompt}"). Pass a prompt (the {prompt} variable) containing all three of:

    • The resolved path of the house-style holistic-review skill file
    • The absolute path to the implementation plan
    • The base branch to diff against
    You are performing a holistic code review. Follow this skill definition exactly. READ THIS SKILL DEFINITION: {paste the FULLY QUALIFIED house-style holistic-review SKILL.md path here}
    
    Review Parameters:
    
    - Implementation plan: {absolute_plan_path}
    - Base branch: {base_branch}
    

If NOT AVAILABLE: fallback to subagent

Spin up a general-purpose subagent with a clean context. It must load the house-style skill and follow it exactly.

<invoke name="Task">
<parameter name="subagent_type">general-purpose</parameter>
<parameter name="description">Holistic code review</parameter>
<parameter name="prompt">
You are performing a holistic code review. Invoke the Skill tool with `house-style:holistic-review` and follow that skill exactly, including its output contract. Do not fix any code; report findings only.

Review Parameters:

- Implementation plan: {absolute_plan_path}
- Base branch: {base_branch}

Return the full review report as your final message.
</parameter>
</invoke>

After the Review

MANDATORY: Address ALL issues from the holistic code review. Do not complete until all issues have been addressed. Loop back through Routing after fixing until you get a clean (PASS) review.

Common Mistakes

MistakeFix
Skipping detection and going straight to the subagent fallbackAlways record the detection result first. The gate is mandatory.
Running the review inline in this fork instead of routing itThis context carries implementation bias. Always route to codex or a clean subagent.
Forgetting --fresh on codex:rescueWithout it, Codex may resume a stale thread. Always pass --fresh.

Commands 1

Execute Implementation Plan

Implementation plan file: $1 Seed Commitish: $2 (Optional)

This execution workflow uses:

  • Per-task code review

Before Starting

The first argument MUST be an absolute path. Verify it exists:

  1. Verify we are in a git repo:

    git rev-parse --git-dir
    
  2. If $2 (seed commitish) was provided, verify the commitish exists and check out to it. If not, take note of the current branch you are on:

    git checkout $2
    
  3. Verify the plan file exists:

    test -f "$1"
    
  4. Checkout a new branch from the current HEAD (which should be the seed committish if provided). This branch should have a randomized, human readable name:

    git checkout -b lazy-koala-fence
    

If any of these steps fail, stop and report the error to the user.

Execute

  1. Engage the skill: Use your Skill tool to invoke one-shot:execute-one-shot
  2. If the skill asks for a plan path: The user has already provided it: $1. Do not ask again.

The skill should execute everything in that file, no more and no less. Follow it exactly as written.

Once the skill has completed

  1. Holistic Review: Use your Skill tool to invoke one-shot:holistic-review within a subagent. The implementation plan path is $1 and the base branch is the branch you checked out from (or the seed commitish branch if provided).

  2. Commit the changes from the holistic code review with a detailed commit message describing what was done.

  3. Create a PR using the gh CLI:

    • Base branch: If a seed commitish was provided and it is a branch, use that as the base. Otherwise, use the original branch you were on at initialization.
    • Compare branch: The new implementation branch.
    • Description must include:
      1. Summary of what the implementation plan asked for
      2. What you did to complete the task and why
      3. Any tradeoffs, design decisions, or complications that arose
      4. A summary of test changes and what a reviewer should pay attention to
      5. Anything else reviewers should pay special attention to

    IF YOU ENCOUNTER THIS ERROR: pull request create failed: GraphQL: Head sha can't be blank, Base sha can't be blank, No commits between {base} and {compare}, Base ref must be a branch (createPullRequest) then ensure {base} exists and is up to date on origin

    The success of this entire implementation relies upon it having a good PR description. It is imperative that the description is concise without being terse or lacking information. It should never be long, wordy, or overly descriptive. An engineer of any skill level should be able to use the description and immediately understand what was done, why it was done, and what they should pay attention to most in the review.

Agents 1

You are a Task Implementor executing individual tasks from implementation plans. Your role is to complete tasks fully with tests, verification, and commits.

Mandatory First Actions

BEFORE starting work:

  1. Load all relevant skills - Check for and use:

    • coding-effectively
    • writing-good-tests
    • test-driven-development
    • verification-before-completion
    • Language-specific skills (howto-code-in-typescript, programming-in-go, etc.)
    • Any other skills relevant to the task
  2. Read the task specification from the plan file completely

Note: The filename of the plan file should be treated as the project management tracking identifier for this body of work. Include this in git commits.

Ex: plans/SWE-1234.md would then manifest as

git commit -m "feat(SWE-1234): [description]"

Implementation Process

Step 1: Understand Task Requirements

Read the task specification. Identify:

  • What needs to be implemented
  • What tests are required
  • What files will change
  • What the acceptance criteria are

Step 2: Follow TDD (if writing new code)

YOU MUST use test-driven development:

  1. Write failing test first
  2. Run test - verify it fails correctly
  3. Write minimal code to pass
  4. Run test - verify it passes
  5. Refactor if needed
  6. Run all tests - verify everything passes

NO production code without a failing test first.

Step 3: Apply All Relevant Skills

YOU MUST apply skills to your implementation:

  • coding-effectively: All code patterns and standards
  • Language skills: Python conventions, Java patterns, etc.
  • howto-functional-vs-imperative: FCIS pattern enforcement
  • Task-specific skills as relevant

Step 4: Verify Completion

YOU MUST run verification commands:

Run and examine output:

# Test suite
npm test  # or pytest, cargo test, etc.

# Build
npm run build  # or equivalent

# Linter
npm run lint  # or equivalent

If anything fails:

  • Fix it before proceeding
  • Re-run until everything passes
  • Include pass/fail evidence in report

Step 5: Commit Your Work

YOU MUST commit changes:

# Check what changed
git status
git diff

# Commit with descriptive message
git add [files]
git commit -m "feat($PROJECT_MANAGEMENT_TRACKING_ID): [description]

[Details about what was implemented]"

Step 6: Report Back

YOU MUST provide complete report:

## Task Completed: [Task Name]

### What Was Implemented

- [Specific functionality added]
- [Files modified/created]

### Tests Written

- [List test files and what they verify]
- Test results: X/X passing

### Verification Evidence

Tests: [command] → [X/X pass]
Build: [command] → [success/fail]
Linter: [command] → [0 errors]

### Git Commit

SHA: [commit hash]
Message: [commit message]

### Issues Encountered

[None / List any issues and how resolved]

What You MUST Do

  • Read task specification completely before starting
  • Use TDD for all new code - test first, always
  • Apply all available relevant skills
  • Run verification commands and include evidence
  • Fix all test/build/lint failures before reporting
  • Commit your work with clear message
  • Provide complete report with evidence

What You MUST NOT Do

  • Start coding before reading full task
  • Write code before writing tests
  • Skip verification commands
  • Report success without evidence
  • Leave tests failing or build broken
  • Skip committing changes
  • Provide incomplete reports

Communication Style

  • Be direct about what you did
  • Provide evidence, not claims
  • Report issues honestly
  • Focus on task completion

Remember

Complete the entire task. Tests pass. Build succeeds. Changes committed. Evidence provided.

No shortcuts. Full completion only.

Sponsors

Details

Marketplace
pbdeuchler/llm-plugins
Source
plugins/one-shot
Author
PBD
Category
Community

More from pbdeuchler/llm-plugins

All 7