xiaohongshu
xiaohongshu
effective-prompting
Master effective prompting techniques for Claude Code. Use when learning prompt patterns, improving task descriptions, optimizing Claude interactions, or troubleshooting why Claude misunderstood a request. Covers @ mentions, thinking keywords, task framing, and iterative refinement.
Full skill instructions
Write prompts that Claude Code understands and executes correctly the first time.
| Technique | When to Use | Example |
|---|---|---|
| @ mentions | Include specific context | @src/api/users.ts |
| ultrathink | Complex reasoning tasks | "ultrathink about the architecture" |
| Success criteria | Clear deliverables | "Done when tests pass" |
| Task decomposition | Multi-step work | "First X, then Y, finally Z" |
| /compact | Long sessions | Summarize and continue |
@ mentions pull specific context into your prompt. Use them liberally.
| Mention | Purpose | Example |
|---|---|---|
@file | Single file | @src/utils/auth.ts |
@folder | Directory contents | @src/api/ |
@url | Web content | @https://docs.example.com/api |
@git | Git context | @git:diff, @git:log |
@src/api/*.ts # All TS files in api folder
@src/**/*.test.ts # All test files recursively
@package.json # Specific file
@src/components/ # Entire folder
@src/api/users.ts > @src/@src/auth.ts @src/auth.test.ts@types/user.ts @src/api/users.tsTrigger deeper reasoning with specific keywords.
| Keyword | Depth | Use Case |
|---|---|---|
think | Standard | General problem-solving |
think harder | Extended | Complex bugs, edge cases |
ultrathink | Deep | Architecture, security, optimization |
megathink | Maximum | Critical decisions, complex refactors |
ultrathink about how to refactor the authentication system
to support OAuth2 while maintaining backward compatibility
with our existing session-based auth @src/auth/
Structure prompts for clarity and precision.
WHAT: [Specific task]
WHY: [Context/motivation]
HOW: [Constraints/approach]
Example:
WHAT: Add rate limiting to the /api/upload endpoint
WHY: Users are uploading large files too frequently, causing server strain
HOW: Use a sliding window approach, 10 requests per minute per user
Always define "done":
Add user search to the dashboard.
Done when:
- Search input filters users in real-time
- Debounced to 300ms
- Shows "No results" for empty matches
- Tests cover happy path and edge cases
Specify boundaries:
Implement caching for API responses.
Constraints:
- Use Redis (already configured in docker-compose)
- TTL of 5 minutes for user data
- No caching for POST/PUT/DELETE
- Must work with existing middleware
For complex work, structure as steps.
Implement user authentication:
1. First, add the User model with email/password fields
2. Then, create login/register API endpoints
3. Next, add JWT token generation and validation
4. Finally, protect routes with auth middleware
Run tests after each step.
These can be done in parallel:
- Add UserCard component
- Add UserList component
- Add UserSearch component
Then combine them in the UserDashboard page.
Refactor the payment module.
Checkpoint 1: Extract PaymentService class
- Run tests, commit if green
Checkpoint 2: Add Stripe integration
- Run tests, commit if green
Checkpoint 3: Add webhook handling
- Run tests, commit if green
Build complex features incrementally.
# Round 1
Add a basic todo list component with hardcoded items.
# Round 2
Now add the ability to add new todos.
# Round 3
Add delete functionality and persist to localStorage.
# Initial
Add pagination to the user list.
# After seeing result
Good, but the page buttons are too small on mobile.
Make them at least 44px tap targets.
# After fix
Perfect. Now add keyboard navigation (arrow keys).
When context grows large:
/compact
Continue with: We're implementing user auth.
Done: User model, login endpoint.
Next: JWT middleware.
Let's start fresh on the auth system.
Ignore previous attempts.
Here's the new approach: [approach]
| Pattern | Template |
|---|---|
| Bug fix | "Fix [bug]. Reproduce: [steps]. Expected: [X]. Actual: [Y]." |
| Feature | "Add [feature]. Requirements: [list]. Done when: [criteria]." |
| Refactor | "Refactor [code] to [goal]. Keep: [constraints]. Test: [how]." |
| Review | "Review @file for [concerns]. Focus on: [areas]." |
| Debug | "Debug why [symptom]. Context: @logs @code. Checked: [attempts]." |
| File | Contents |
|---|---|
| PATTERNS.md | Detailed prompt patterns for specific tasks |
| EXAMPLES.md | Real-world prompt examples |
| ANTI-PATTERNS.md | Common mistakes and how to avoid them |
Before sending a complex prompt:
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience