askill
generate-prompt

generate-promptSafety 100Repository

Generate a detailed, context-rich prompt for Claude Code by analyzing the codebase and user intent - outputs the prompt for copying or saving

0 stars
1.2k downloads
Updated 2/12/2026

Package Files

Loading files...
SKILL.md

Generate Prompt

You are generating a comprehensive prompt that can be given to Claude Code (in a new session or shared with a teammate) to accomplish a development task. The prompt should include all the context Claude Code needs to be productive immediately.

Workflow

1. Gather User Intent

If the user didn't provide a task description with /generate-prompt, ask:

What do you want Claude Code to do? Describe the task, feature, bug fix, or change you need.

Get a clear understanding of:

  • What needs to be done
  • Any constraints or preferences
  • Expected outcome

2. Analyze the Codebase

Gather context that Claude Code would need. Run these in parallel:

Project type and structure:

  • Check for package.json, Cargo.toml, pyproject.toml, go.mod, etc. to identify the tech stack
  • Read CLAUDE.md if it exists (contains project-specific instructions)
  • Read README.md for project overview
  • Run ls on the root to understand top-level structure

Relevant files:

  • Based on the user's task, identify which files and directories are most relevant
  • Use Grep to find related code (function names, component names, API endpoints mentioned in the task)
  • Read key files to understand patterns, conventions, and architecture

Dependencies and tools:

  • Check dependency files for relevant libraries
  • Check for config files (.eslintrc, tsconfig.json, Makefile, etc.)
  • Check for test framework setup

Git context:

  • Current branch: git branch --show-current
  • Recent commits: git log --oneline -5
  • Any uncommitted changes: git status --short

3. Generate the Prompt

Structure the prompt with these sections:

# Task
[Clear, actionable description of what to do]

## Context
- **Project**: [name, type, tech stack]
- **Key files**: [files most relevant to the task]
- **Branch**: [current branch]

## Codebase Overview
[Brief architecture summary relevant to the task — patterns used,
directory structure, key conventions from CLAUDE.md]

## Relevant Code
[Snippets or file references that show existing patterns, APIs,
or code that the task builds on or modifies]

## Requirements
[Specific requirements, constraints, and acceptance criteria]

## Implementation Hints
[Suggested approach based on codebase analysis — which files to modify,
patterns to follow, tests to write]

Prompt quality guidelines:

  • Be specific, not generic — reference actual files, functions, and patterns from the codebase
  • Include enough context that a fresh Claude Code session can start working immediately
  • Don't dump entire files — include relevant snippets and file paths
  • Mention conventions the project follows (from CLAUDE.md, commit style, test patterns)
  • Include the "why" not just the "what"

4. Output the Prompt

Display the generated prompt in a code block so the user can copy it:

Here's your generated prompt:

```
[the full prompt]
```

5. Offer to Save

Ask if the user wants to save the prompt:

  • Save to .claude/prompts/<task-slug>.md for reuse
  • Create the directory if it doesn't exist

Arguments

ArgumentEffect
(none)Interactive — ask what the user wants
<task description>Use the provided description directly
--saveAuto-save the prompt to .claude/prompts/

Tips for Good Prompts

  • Reference specific file paths so Claude Code can find them quickly
  • Mention test files and testing patterns so Claude Code writes tests
  • Include architectural constraints ("use the existing pattern in X")
  • Specify output format if relevant ("create a new file at X")
  • Mention what NOT to do if there are common pitfalls

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

90/100Analyzed 2/19/2026

Well-structured skill for generating Claude Code prompts with clear workflow steps, concrete commands, and quality guidelines. Includes argument table, tips for good prompts, and structured output format. Located in dedicated skills folder with good metadata. Slightly higher depth suggests some repo-specific context, but the skill itself is generic and reusable.

100
90
85
85
90

Metadata

Licenseunknown
Version-
Updated2/12/2026
Publisherjason-hchsieh

Tags

apigithub-actionsllmpromptingtesting