Shell

Claude Code/Codex CLI Skills - RPI Framework

This directory contains custom skills for the RPI (Research, Plan, Implement) methodology - a structured approach to software development that ensures quality through systematic validation.

$ Installer

git clone https://github.com/ferdiangunawan/rpi-stack ~/.claude/skills/rpi-stack

// tip: Run this command in your terminal to install the skill

Claude Code/Codex CLI Skills - RPI Framework

Overview

This directory contains custom skills for the RPI (Research, Plan, Implement) methodology - a structured approach to software development that ensures quality through systematic validation.

Agent Compatibility

These skills are used by both Claude Code and Codex CLI.

  • OUTPUT_DIR: .claude/output for Claude Code, .codex/output for Codex CLI.
  • SKILLS_DIR: ~/.claude/skills for Claude Code, ~/.codex/skills for Codex CLI.
  • Slash commands like /rpi are Claude Code syntax; in Codex CLI, invoke the skill by name in the prompt.
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                           RPI WORKFLOW                                       โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚                                                                             โ”‚
โ”‚   INPUT              RESEARCH           AUDIT            PLAN               โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”           โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”            โ”‚
โ”‚  โ”‚ Jira โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ถโ”‚      โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ถโ”‚      โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ถโ”‚      โ”‚            โ”‚
โ”‚  โ”‚ PRD  โ”‚           โ”‚      โ”‚  PASS?   โ”‚      โ”‚  PASS?  โ”‚      โ”‚            โ”‚
โ”‚  โ”‚Promptโ”‚           โ”‚      โ”‚          โ”‚      โ”‚         โ”‚      โ”‚            โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜           โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜            โ”‚
โ”‚                         โ”‚                                  โ”‚                โ”‚
โ”‚                         โ–ผ                                  โ–ผ                โ”‚
โ”‚                    research.md                         plan.md              โ”‚
โ”‚                                                                             โ”‚
โ”‚                     AUDIT             IMPLEMENT         REVIEW              โ”‚
โ”‚                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”             โ”‚
โ”‚               โ”€โ”€โ”€โ”€โ–ถโ”‚      โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ถโ”‚      โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ถโ”‚      โ”‚             โ”‚
โ”‚                    โ”‚      โ”‚  PASS?   โ”‚      โ”‚         โ”‚      โ”‚             โ”‚
โ”‚                    โ”‚      โ”‚          โ”‚      โ”‚         โ”‚      โ”‚             โ”‚
โ”‚                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜             โ”‚
โ”‚                                          โ”‚                โ”‚                 โ”‚
โ”‚                                          โ–ผ                โ–ผ                 โ”‚
โ”‚                                       CODE            APPROVED              โ”‚
โ”‚                                                                             โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Available Skills

SkillTriggerDescription
RPI/rpiFull workflow orchestrator
Research/researchGather context and assess confidence
Audit/auditValidate against over/under/hallucination
Plan/planCreate detailed implementation plan
Implement/implementExecute plan with tracking
Code Review/code-reviewReview code with P0/P1/P2 severity

Quick Start

Full RPI Workflow

Claude Code uses slash commands; Codex CLI uses the skill name in the prompt.

# From Jira issue
/rpi KB-1234

# From Confluence PRD
/rpi https://kickavenue.atlassian.net/wiki/spaces/DEV/pages/123456

# From direct requirements
/rpi Add feature to export user data as CSV

Individual Skills

Claude Code uses slash commands; Codex CLI uses the skill name in the prompt.

# Research only
/research KB-1234

# Audit a document
/audit research
/audit plan

# Create plan from research
/plan

# Implement from plan
/implement

# Code review
/code-review
/code-review path/to/file.dart

Output Files

All RPI outputs are saved to OUTPUT_DIR:

OUTPUT_DIR/
โ”œโ”€โ”€ research-{feature}.md    # Research findings
โ”œโ”€โ”€ plan-{feature}.md        # Implementation plan
โ”œโ”€โ”€ audit-{feature}.md       # Audit reports
โ””โ”€โ”€ review-{feature}.md      # Code review reports

Quality Gates

Gate 1: Research Validation

  • Confidence Score โ‰ฅ 60%
  • Hallucination Score โ‰ค 20%
  • Coverage โ‰ฅ 80%

Gate 2: Plan Validation

  • All requirements traced to tasks
  • No architectural violations
  • Plan Score โ‰ฅ 70%

Gate 3: Implementation Validation

  • All tasks completed
  • flutter analyze passes
  • Code review approved

Severity Levels

Audit Scores

  • Hallucination: Inventing requirements (target: โ‰ค20%)
  • Overengineering: Adding unnecessary complexity (target: โ‰ค15%)
  • Underengineering: Missing requirements (target: โ‰ค15%)
  • Balance: Sweet spot between over/under (target: โ‰ฅ70%)

Code Review

  • P0 (Critical): Must fix - security, crashes, data loss
  • P1 (Important): Should fix - bugs, performance, patterns
  • P2 (Nice-to-have): Consider - style, docs, minor improvements

File Structure

Each skill is organized in its own subfolder with a SKILL.md file:

SKILLS_DIR/
โ”œโ”€โ”€ README.md               # This file
โ”œโ”€โ”€ audit/
โ”‚   โ””โ”€โ”€ SKILL.md            # Audit skill definition
โ”œโ”€โ”€ code-review/
โ”‚   โ””โ”€โ”€ SKILL.md            # Code review skill definition
โ”œโ”€โ”€ implement/
โ”‚   โ””โ”€โ”€ SKILL.md            # Implementation skill definition
โ”œโ”€โ”€ plan/
โ”‚   โ””โ”€โ”€ SKILL.md            # Planning skill definition
โ”œโ”€โ”€ research/
โ”‚   โ””โ”€โ”€ SKILL.md            # Research skill definition
โ””โ”€โ”€ rpi/
    โ””โ”€โ”€ SKILL.md            # RPI orchestrator skill definition

Integration with AGENTS.md

All skills are designed to work with project-specific AGENTS.md:

  1. Research reads AGENTS.md to understand project patterns
  2. Audit validates against AGENTS.md conventions
  3. Plan uses AGENTS.md patterns for task templates
  4. Implement follows AGENTS.md strictly
  5. Code Review checks AGENTS.md compliance

Best Practices

When to Use Full RPI

  • New features with unclear scope
  • Complex multi-file changes
  • Features from Jira/Confluence PRD

When to Use Individual Skills

  • /research - When exploring feasibility
  • /audit - When validating existing plans
  • /plan - When scope is already clear
  • /implement - When plan exists
  • /code-review - After any significant code changes

Tips

  1. Always run full RPI for Jira tickets
  2. Use audit between research and plan
  3. Don't skip audit gates
  4. Review code before marking complete
  5. Keep outputs for documentation

Adding New Skills

To add a new skill:

  1. Create a subfolder: SKILLS_DIR/{skill-name}/
  2. Create SKILL.md inside the subfolder with:
    • Skill metadata (name, description, trigger)
    • Skill logic and instructions
    • Output format
  3. Restart Claude Code or Codex CLI to load the new skill

Example structure:

SKILLS_DIR/my-skill/
โ””โ”€โ”€ SKILL.md

Troubleshooting

"Low Confidence Score"

  • Missing information in PRD
  • Run /research with more specific query
  • Ask stakeholder for clarification

"Audit Failed"

  • Review specific findings
  • Address P0/P1 issues
  • Re-run audit after fixes

"Pattern Violation"

  • Check AGENTS.md for correct pattern
  • Look at similar existing code
  • Follow project conventions exactly

"Skill Not Found"

  • Ensure skill folder exists: SKILLS_DIR/{skill-name}/
  • Ensure SKILL.md file exists inside the folder
  • Restart Claude Code or Codex CLI to reload skills