xiaohongshu
xiaohongshu
agent-prompt-behavior
Design agent system prompts with explicit behavior rules and cognitive control. This skill should be used when users need to define agent instructions, create intent-to-tool mappings, establish confirmation policies, or prevent hallucinated actions in AI agents.
Full skill instructions
Build system prompts that provide deterministic cognitive control over AI agents.
Gather context to ensure successful implementation:
| Source | Gather |
|---|---|
| Codebase | Available tools, existing prompts, agent framework |
| Conversation | Agent's purpose, domain, user types |
| Skill References | Prompt patterns, mapping rules, safety policies |
| User Guidelines | Tone, brand voice, compliance requirements |
The system prompt is the agent's brain. It determines:
┌─────────────────────────────────────────────────────────────┐
│ COGNITIVE CONTROL │
├─────────────────────────────────────────────────────────────┤
│ IDENTITY │ Who am I? What's my purpose? │
│ CAPABILITIES │ What tools can I use? What can't I do? │
│ BEHAVIOR │ How do I respond? When do I confirm? │
│ GROUNDING │ What prevents me from hallucinating? │
│ ERRORS │ How do I handle failures gracefully? │
└─────────────────────────────────────────────────────────────┘
Before building the system prompt, clarify:
A complete system prompt has 6 sections:
┌─────────────────────────────────────────┐
│ 1. IDENTITY & PURPOSE │
│ Who you are, what you do │
├─────────────────────────────────────────┤
│ 2. CAPABILITIES & TOOLS │
│ What you CAN do (explicit list) │
├─────────────────────────────────────────┤
│ 3. BOUNDARIES & CONSTRAINTS │
│ What you CANNOT do (explicit list) │
├─────────────────────────────────────────┤
│ 4. INTENT → TOOL MAPPING │
│ How to interpret user requests │
├─────────────────────────────────────────┤
│ 5. CONFIRMATION POLICY │
│ When to ask before acting │
├─────────────────────────────────────────┤
│ 6. ERROR HANDLING │
│ How to handle failures gracefully │
└─────────────────────────────────────────┘
See assets/system-prompt-template.md for complete template.
The most critical section. Maps natural language → deterministic action.
## Intent Mapping
| User Says (Intent) | Tool to Call | Parameters | Confirmation |
|--------------------|--------------|------------|--------------|
| "create a task" | create_task | title, description | No |
| "delete task X" | delete_task | task_id | Yes |
| "show my tasks" | list_tasks | user_id | No |
| "mark X as done" | update_task | task_id, completed=true | No |
See references/intent-mapping.md for patterns and examples.
| Category | Examples | Why Confirm |
|---|---|---|
| Destructive | Delete, remove, cancel | Irreversible |
| Financial | Purchase, transfer, refund | Real money |
| External | Send email, post message | Visible to others |
| Bulk | Delete all, update all | Large impact |
Before I [action], let me confirm:
- [Detail 1]
- [Detail 2]
Proceed? (yes/no)
See references/confirmation-policy.md for implementation.
Critical: The agent must ONLY use tools it actually has.
## Grounding Rules
1. ONLY call tools listed in your capabilities
2. NEVER invent tool names or parameters
3. If no tool matches the request, say so clearly
4. NEVER claim to have done something you didn't do
5. If a tool call fails, report the failure honestly
When you receive a request you cannot fulfill:
1. Acknowledge the request
2. Explain what you CAN do instead
3. Offer alternatives if available
4. Never pretend or hallucinate capabilities
## When Tools Fail
If a tool returns an error:
1. Do NOT retry automatically (unless specified)
2. Explain what happened in plain language
3. Suggest what the user can do
4. Offer to try an alternative approach
Example:
"I tried to create the task, but the database returned an error.
This might be a temporary issue. Would you like me to try again,
or would you prefer to wait a few minutes?"
## Graceful Degradation
If you cannot complete a request:
1. Complete as much as possible
2. Clearly state what succeeded and what failed
3. Provide partial results if available
4. Suggest next steps
See references/error-handling.md for patterns.
1. CLARIFY
└─→ Gather identity, tools, safety requirements
2. ENUMERATE TOOLS
└─→ List all available tools with descriptions
3. MAP INTENTS
└─→ Create intent → tool mapping table
4. DEFINE BOUNDARIES
└─→ List forbidden actions and scope limits
5. SET CONFIRMATION POLICY
└─→ Mark which actions need confirmation
6. ADD ERROR HANDLING
└─→ Define failure responses
7. ASSEMBLE PROMPT
└─→ Use template to create complete prompt
8. VALIDATE
└─→ Check for gaps, ambiguities, conflicts
| Anti-Pattern | Problem | Better Approach |
|---|---|---|
| Vague capabilities | "Help with tasks" | List specific tools |
| Missing boundaries | Agent tries anything | Explicit "do not" list |
| No confirmation | Destroys data silently | Confirm destructive actions |
| Silent failures | User thinks it worked | Always report errors |
| Invented tools | Hallucinated actions | Grounding rules |
| Ambiguous mapping | Wrong tool called | Specific intent patterns |
Before delivering a system prompt:
| File | When to Read |
|---|---|
references/system-prompt-patterns.md | Prompt structure and examples |
references/intent-mapping.md | Intent recognition and mapping rules |
references/confirmation-policy.md | When and how to confirm actions |
references/error-handling.md | Failure modes and responses |
assets/system-prompt-template.md | Complete template to fill in |
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