MCP HubMCP Hub
返回技能列表

creating-kiro-agents

pr-pm
更新于 Today
177 次查看
62
9
62
在 GitHub 上查看
aidesign

关于

This skill provides structured guidance for developers creating custom Kiro AI agents, including JSON configurations, tool setups, and prompt patterns. It delivers best practices for building specialized development assistants with proper security and permissions. Use it specifically for Kiro agent workflows, not for generic AI prompts or project documentation.

快速安装

Claude Code

推荐
插件命令推荐
/plugin add https://github.com/pr-pm/prpm
Git 克隆备选方式
git clone https://github.com/pr-pm/prpm.git ~/.claude/skills/creating-kiro-agents

在 Claude Code 中复制并粘贴此命令以安装该技能

技能文档

Creating Kiro Agents

Expert guidance for creating specialized Kiro AI agents with proper configuration, tools, and security.

When to Use

Use when:

  • User asks to create a Kiro agent
  • Need specialized AI assistant for specific workflow
  • Building domain-focused development tools
  • Configuring agent tools and permissions

Don't use for:

  • Generic AI prompts (not Kiro-specific)
  • Project documentation (use steering files instead)
  • One-off assistant interactions

Quick Reference

Minimal Agent Structure

{
  "name": "agent-name",
  "description": "One-line purpose",
  "prompt": "System instructions",
  "tools": ["fs_read", "fs_write"]
}

File Location

  • Project: .kiro/agents/<name>.json
  • Global: ~/.kiro/agents/<name>.json

Common Tools

  • fs_read - Read files
  • fs_write - Write files (requires allowedPaths)
  • execute_bash - Run commands (requires allowedCommands)
  • MCP server tools (varies by server)

Core Principles

1. Specialization Over Generalization

Good: backend-api-specialist - Express.js REST APIs ❌ Bad: general-helper - does everything

2. Least Privilege

Grant only necessary tools and paths.

{
  "toolsSettings": {
    "fs_write": {
      "allowedPaths": ["src/api/**", "tests/api/**"]
    },
    "execute_bash": {
      "allowedCommands": ["npm test", "npm run build"]
    }
  }
}

3. Clear, Structured Prompts

Good:

You are a backend API expert specializing in Express.js and MongoDB.

## Focus Areas
- RESTful API design
- Security best practices (input validation, auth)
- Error handling with proper status codes
- MongoDB query optimization

## Standards
- Always use async/await
- Implement proper logging
- Validate all inputs
- Use TypeScript interfaces

Bad: "You are a helpful coding assistant."

Common Patterns

Backend Specialist

{
  "name": "backend-dev",
  "description": "Node.js/Express API development with MongoDB",
  "prompt": "Backend development expert. Focus on API design, database optimization, and security.\n\n## Core Principles\n- RESTful conventions\n- Input validation\n- Error handling\n- Query optimization",
  "tools": ["fs_read", "fs_write", "execute_bash"],
  "toolsSettings": {
    "fs_write": {
      "allowedPaths": ["src/api/**", "src/routes/**", "src/models/**"]
    }
  }
}

Code Reviewer

{
  "name": "code-reviewer",
  "description": "Reviews code against team standards",
  "prompt": "You review code for:\n- Quality and readability\n- Security issues\n- Performance problems\n- Standard compliance\n\nProvide constructive feedback with examples.",
  "tools": ["fs_read"],
  "resources": ["file://.kiro/steering/review-checklist.md"]
}

Test Writer

{
  "name": "test-writer",
  "description": "Writes comprehensive Vitest test suites",
  "prompt": "Testing expert using Vitest.\n\n## Test Requirements\n- Unit tests for all functions\n- Edge case coverage\n- Proper mocking\n- AAA pattern (Arrange, Act, Assert)\n- Descriptive test names",
  "tools": ["fs_read", "fs_write"],
  "toolsSettings": {
    "fs_write": {
      "allowedPaths": ["**/*.test.ts", "**/*.spec.ts", "tests/**"]
    }
  }
}

Frontend Specialist

{
  "name": "frontend-dev",
  "description": "React/Next.js development with TypeScript",
  "prompt": "Frontend expert in React, Next.js, and TypeScript.\n\n## Focus\n- Component architecture\n- Performance optimization\n- Accessibility (WCAG)\n- Responsive design",
  "tools": ["fs_read", "fs_write"],
  "toolsSettings": {
    "fs_write": {
      "allowedPaths": ["src/components/**", "src/app/**", "src/styles/**"]
    }
  }
}

Advanced Configuration

MCP Servers

{
  "mcpServers": {
    "database": {
      "command": "mcp-server-postgres",
      "args": ["--host", "localhost"],
      "env": {
        "DB_URL": "${DATABASE_URL}"
      }
    },
    "fetch": {
      "command": "mcp-server-fetch",
      "args": []
    }
  },
  "tools": ["fs_read", "db_query", "fetch"],
  "allowedTools": ["fetch"]
}

Lifecycle Hooks

{
  "hooks": {
    "agentSpawn": ["git fetch origin", "npm run db:check"],
    "userPromptSubmit": ["git status --short"]
  }
}

Resource Loading

{
  "resources": [
    "file://.kiro/steering/api-standards.md",
    "file://.kiro/steering/security-policy.md"
  ]
}

Workflow

  1. Clarify Requirements

    • What domain/task?
    • What tools needed?
    • What file paths?
    • What standards to follow?
  2. Design Configuration

    • Choose appropriate pattern
    • Set tool restrictions
    • Write clear prompt
    • Reference steering files
  3. Create Agent File

    # Create in project
    touch .kiro/agents/my-agent.json
    
    # Or global
    touch ~/.kiro/agents/my-agent.json
    
  4. Test Agent

    kiro agent use my-agent
    kiro "What can you help me with?"
    

Common Mistakes

MistakeProblemFix
Granting all toolsSecurity riskOnly grant necessary tools
Vague promptsIneffective agentBe specific about domain and standards
No path restrictionsAgent can modify any fileUse allowedPaths for fs_write
Generic namesHard to find/rememberUse descriptive names: react-component-creator
Missing descriptionUnclear purposeAdd one-sentence description
Multiple domainsUnfocused agentCreate separate specialized agents

Best Practices

Naming

  • Use kebab-case: backend-specialist, not BackendSpecialist
  • Be specific: react-testing-expert, not helper
  • Indicate domain: aws-infrastructure, mobile-ui-designer

Prompts

  1. Define expertise area clearly
  2. List specific focus areas
  3. Specify standards/conventions
  4. Provide pattern examples
  5. Set clear expectations

Security

  1. Grant minimum necessary tools
  2. Restrict file paths with allowedPaths
  3. Whitelist commands with allowedCommands
  4. Use allowedTools for safe operations
  5. Validate all configurations

Troubleshooting

Agent Not Found

  • Check file is in .kiro/agents/
  • Verify .json extension
  • Validate JSON syntax (use JSON validator)

Tools Not Working

  • Verify tool names (check spelling)
  • Check allowedPaths restrictions
  • Ensure MCP servers are installed
  • Review allowedTools list

Prompt Ineffective

  • Be more specific about tasks
  • Add concrete examples
  • Reference team standards
  • Structure with markdown headers

Integration with PRPM

# Install Kiro agent from registry
prpm install @username/agent-name --as kiro --subtype agent

# Publish your agent
prpm init my-agent --subtype agent
# Edit canonical format, then:
prpm publish

Real-World Impact

Effective agents:

  • Save time on repetitive tasks
  • Enforce team standards automatically
  • Reduce context switching
  • Provide consistent code quality
  • Enable workflow automation

Example: A test-writer agent that only writes to test files prevents accidental modification of source code while ensuring comprehensive test coverage.


Key Takeaway: Specialize agents for specific domains, restrict tools to minimum necessary, and write clear prompts with concrete standards.

GitHub 仓库

pr-pm/prpm
路径: .claude/skills/creating-kiro-agents
claudeclaude-codecursorcursor-ai-editcursorrulespackage-manager

相关推荐技能

content-collections

Content Collections 是一个 TypeScript 优先的构建工具,可将本地 Markdown/MDX 文件转换为类型安全的数据集合。它专为构建博客、文档站和内容密集型 Vite+React 应用而设计,提供基于 Zod 的自动模式验证。该工具涵盖从 Vite 插件配置、MDX 编译到生产环境部署的完整工作流。

查看技能

creating-opencode-plugins

该Skill为开发者创建OpenCode插件提供指导,涵盖命令、文件、LSP等25+种事件类型。它详细说明了插件结构、事件API规范及JavaScript/TypeScript实现模式,帮助开发者构建事件驱动的模块。适用于需要拦截操作、扩展功能或自定义AI助手行为的插件开发场景。

查看技能

sglang

SGLang是一个专为LLM设计的高性能推理框架,特别适用于需要结构化输出的场景。它通过RadixAttention前缀缓存技术,在处理JSON、正则表达式、工具调用等具有重复前缀的复杂工作流时,能实现极速生成。如果你正在构建智能体或多轮对话系统,并追求远超vLLM的推理性能,SGLang是理想选择。

查看技能

evaluating-llms-harness

测试

该Skill通过60+个学术基准测试(如MMLU、GSM8K等)评估大语言模型质量,适用于模型对比、学术研究及训练进度追踪。它支持HuggingFace、vLLM和API接口,被EleutherAI等行业领先机构广泛采用。开发者可通过简单命令行快速对模型进行多任务批量评估。

查看技能