本文へ移動
cccskills
無料GitHub で公開

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.

インストール方法を見る

含まれるファイル(2)

  • SKILL.md9.6 KB
  • metadata.json843 B

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Agent Prompt & Behavior

Build system prompts that provide deterministic cognitive control over AI agents.

What This Skill Does

  • Design agent system instructions with explicit behavior rules
  • Create intent-to-tool mapping tables (what user says → what agent does)
  • Define confirmation policies (when to ask before acting)
  • Establish error handling behaviors
  • Prevent hallucinated actions through grounding rules
  • Generate complete, production-ready system prompts

What This Skill Does NOT Do

  • Implement the agent runtime/executor
  • Handle conversation state management
  • Define API contracts or schemas
  • Deploy or test agents

Before Implementation

Gather context to ensure successful implementation:

SourceGather
CodebaseAvailable tools, existing prompts, agent framework
ConversationAgent's purpose, domain, user types
Skill ReferencesPrompt patterns, mapping rules, safety policies
User GuidelinesTone, brand voice, compliance requirements

Core Principle: Cognitive Control

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?      │
└─────────────────────────────────────────────────────────────┘

Required Clarifications

Before building the system prompt, clarify:

1. Agent Identity

  • Purpose: What is this agent for? (task assistant, customer support, code helper)
  • Domain: What domain knowledge is needed?
  • Persona: Any personality traits or tone requirements?

2. Available Tools

  • Tool list: What tools/functions can the agent call?
  • Tool descriptions: What does each tool do?
  • Tool constraints: Any usage limits or conditions?

3. Safety Requirements

  • Destructive actions: Which actions need confirmation?
  • Forbidden actions: What must the agent never do?
  • Scope limits: What's out of scope?

4. Error Policy

  • Failure modes: How should the agent handle tool failures?
  • Ambiguity: What if user intent is unclear?
  • Escalation: When should agent defer to human?

System Prompt Architecture

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.


Intent-to-Tool Mapping

The most critical section. Maps natural language → deterministic action.

Mapping Table Format

## 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 |

Mapping Rules

  1. Be exhaustive: List ALL supported intents
  2. Be specific: Avoid ambiguous mappings
  3. Include variations: "delete", "remove", "get rid of" → same tool
  4. Mark confirmations: Destructive actions need confirmation

See references/intent-mapping.md for patterns and examples.


Confirmation Policy

Actions Requiring Confirmation

CategoryExamplesWhy Confirm
DestructiveDelete, remove, cancelIrreversible
FinancialPurchase, transfer, refundReal money
ExternalSend email, post messageVisible to others
BulkDelete all, update allLarge impact

Confirmation Format

Before I [action], let me confirm:
- [Detail 1]
- [Detail 2]

Proceed? (yes/no)

See references/confirmation-policy.md for implementation.


Grounding Rules (Prevent Hallucination)

Critical: The agent must ONLY use tools it actually has.

Grounding Principles

## 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

Unknown Intent Handling

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

Error Handling Behavior

Error Response Pattern

## 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

## 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.


Workflow: Building a System Prompt

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-Patterns to Avoid

Anti-PatternProblemBetter Approach
Vague capabilities"Help with tasks"List specific tools
Missing boundariesAgent tries anythingExplicit "do not" list
No confirmationDestroys data silentlyConfirm destructive actions
Silent failuresUser thinks it workedAlways report errors
Invented toolsHallucinated actionsGrounding rules
Ambiguous mappingWrong tool calledSpecific intent patterns

Output Checklist

Before delivering a system prompt:

  • Identity section defines purpose clearly
  • All available tools listed with descriptions
  • Intent → tool mapping is exhaustive
  • Boundaries and forbidden actions explicit
  • Confirmation policy covers destructive actions
  • Error handling defined for all failure modes
  • Grounding rules prevent hallucination
  • Unknown intent handling specified
  • Tone and persona consistent throughout

Reference Files

FileWhen to Read
references/system-prompt-patterns.mdPrompt structure and examples
references/intent-mapping.mdIntent recognition and mapping rules
references/confirmation-policy.mdWhen and how to confirm actions
references/error-handling.mdFailure modes and responses
assets/system-prompt-template.mdComplete template to fill in

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Use when you need to install the embedded robot agents into either .cursor/agents or .claude/agents, selecting the destination interactively and copying the embedded agent definitions from project assets. This should trigger for requests such as Install embedded agents; Bootstrap .cursor/agents; Bootstrap .claude/agents; Copy robot agents. Part of cursor-rules-java project

日本語の概要は準備中です。原文の説明を表示しています。

majiayu000/claude-skill-registry-data262026年10月11日 更新

Use when you need to generate an AGENTS.md file for a Java repository — covering project conventions, tech stack, file structure, commands, Git workflow, and contributor boundaries — through a modular, step-based interactive process that adapts to your specific project needs. This should trigger for requests such as Create AGENTS.md; Update AGENTS.md file; Add agent instructions. Part of cursor-rules-java project

日本語の概要は準備中です。原文の説明を表示しています。

majiayu000/claude-skill-registry-data262026年10月11日 更新

Expert legal research agent for finding and scraping expungement data state by state. Knows authoritative sources, URL patterns, Firecrawl configuration, and 2026 legal landscape. Activate on "find expungement data", "scrape state laws", "legal research", "court URLs", "statute sources", "Clean Slate laws", "automatic expungement research". NOT for interpreting laws (use national-expungement-expert), building UI, or legal advice.

日本語の概要は準備中です。原文の説明を表示しています。

majiayu000/claude-skill-registry-data262026年10月11日 更新

Generated by Gremlin Forge Meta-Agent 🍆👾⚡

日本語の概要は準備中です。原文の説明を表示しています。

majiayu000/claude-skill-registry-data262026年10月11日 更新

Work autonomously without waiting for hand-holding — complete tasks end-to-end without asking for permission at every step.

日本語の概要は準備中です。原文の説明を表示しています。

majiayu000/claude-skill-registry-data262026年10月11日 更新

abmahnung

無料

Entwurf einer BAG-konformen Abmahnung im Arbeitsrecht – konkrete Schilderung der Pflichtverletzung, klare Verhaltenserwartung, ausdrückliche Sanktionsandrohung. Use when AG eine verhaltensbedingte Sanktion vor einer Kündigung dokumentieren muss oder AN die Wirksamkeit einer empfangenen Abmahnung prüft.

日本語の概要は準備中です。原文の説明を表示しています。

majiayu000/claude-skill-registry-data262026年10月11日 更新

majiayu000 のスキルをすべて見る

このスキルの問題を報告する