๐Ÿ› ๏ธ Agent Exercise 1: Convert Your Template to a SKILL.md

Take the prompt template you built on Day 2 and turn it into a reusable, auto-activating skill with steering and hooks.

โฑ 25 minutes

Exercise Overview

On Day 2, you built a prompt template (merchant risk assessment or credit risk narrative). Today, you'll convert that template into a production-ready SKILL.md file that:

๐Ÿ’ก What you'll learn

This exercise teaches the three-layer Kiro automation stack: Steering (global rules) + Skills (on-demand expertise) + Hooks (automated triggers). By the end, you'll have a working skill that could be deployed in your team's project today.
StepWhat you doDuration
Step 1Create a steering file with global rules5 min
Step 2Convert your prompt template to SKILL.md8 min
Step 3Add a hook to auto-trigger the skill7 min
Step 4Test the full stack5 min

Step 1: Create a Steering File

Steering files are always-on rules that apply to every conversation in your project. They're like a team style guide for AI.

In Kiro, ask the AI to create a steering file:

PROMPT โ€” Copy & paste into Kiro
Create a steering file at .kiro/steering/anycompany-rules.md with these global rules for our AnyCompany Financial Group project: 1. All monetary amounts must be in SGD (Singapore Dollars) unless a specific market is referenced 2. Never include personally identifiable information (PII) in outputs โ€” use [REDACTED] for names, account numbers, and contact details 3. Use AnyCompany Financial Group as the company name throughout 4. Southeast Asian market context: Singapore, Malaysia, Indonesia, Thailand, Vietnam, Philippines 5. All risk ratings must use the GREEN/AMBER/RED scale 6. When citing data, always reference the specific source field or document section 7. If data is missing or unavailable, state "DATA NOT AVAILABLE" rather than estimating Format it as a proper Kiro steering file with a front-matter section.
โœ… Checkpoint: You should now have a file at .kiro/steering/anycompany-rules.md. Open it and verify the rules are there. These rules will apply to every conversation in this project from now on.

Step 2: Convert Your Template to SKILL.md

Now take the prompt template you built in the Day 2 exercise and convert it into a SKILL.md file.

โš ๏ธ Which template? Use whichever you built on Day 2:
  • Exercise 1 participants: Your merchant risk assessment template
  • Exercise 2 participants: Your credit risk narrative template

Ask Kiro to create the skill:

PROMPT โ€” For Merchant Risk template
Create a Kiro skill at .kiro/skills/merchant-risk-assessment/SKILL.md Use this structure: - name: merchant-risk-assessment - description: Generate standardized merchant risk assessments with GREEN/AMBER/RED ratings. Use when reviewing merchant data, preparing risk committee reports, or evaluating merchant applications for AnyCompany Financial Group. For the skill content, use the prompt template I built in the Day 2 exercise. The template should include: - The Senior Risk Analyst persona - The 8-section structured output (Risk Rating, Executive Summary, Transaction Analysis, Chargeback Assessment, Complaint Analysis, Compliance Status, Recommended Actions, Monitoring Plan) - RAG grounding rules (ONLY use provided data) - Self-critique step - All {{variables}} for merchant data inputs Also add a "## When to Use" section listing the trigger scenarios: - New merchant onboarding review - Quarterly merchant portfolio assessment - Triggered by chargeback rate exceeding 1.0% threshold - Risk committee preparation And a "## Guardrails" section with: - Use ONLY provided merchant data - Do not reference external data sources - Flag [DATA NOT AVAILABLE] for missing metrics - Escalate to human review if risk rating is RED
PROMPT โ€” For Credit Risk template (alternative)
Create a Kiro skill at .kiro/skills/credit-risk-narrative/SKILL.md Use this structure: - name: credit-risk-narrative - description: Convert quantitative credit model outputs (PD, LGD, DSCR) into plain-language narratives for credit committees. Use when preparing credit applications, PayLater limit reviews, or merchant financing assessments. For the skill content, use the prompt template I built in the Day 2 exercise. Include: - The Credit Committee Analyst persona - Structured output with APPROVE / APPROVE WITH CONDITIONS / DECLINE - Bull case and bear case analysis - All {{variables}} for credit model inputs Add "## When to Use" and "## Guardrails" sections similar to the merchant risk skill.
โœ… Checkpoint: You should now have a SKILL.md file in .kiro/skills/merchant-risk-assessment/ (or credit-risk-narrative/). Open it and verify:
  • The frontmatter has name and description fields
  • The description includes trigger keywords
  • The template content matches what you built on Day 2
  • There's a Guardrails section with negative constraints

Step 3: Add a Hook for Auto-Triggering

Hooks make your skill run automatically when certain events happen โ€” no prompting needed.

PROMPT โ€” Copy & paste into Kiro
Create a Kiro hook that automatically runs the merchant risk assessment when new merchant data files are added to the project. The hook should: - Trigger when a CSV file is created in the workspace - Ask the agent to: "A new merchant data file was created. Use the merchant-risk-assessment skill to analyze this data and generate a risk assessment report. Save the output as a markdown file in the same directory with '_assessment' appended to the filename." Save it as a proper Kiro hook file.
โœ… Checkpoint: You should now have a hook file. To test it:
  1. Create a simple CSV file with merchant data in your workspace
  2. The hook should trigger and Kiro should automatically generate a risk assessment
  3. Check that the steering rules (SGD, no PII, GREEN/AMBER/RED) are applied

Step 4: Test the Full Stack

Now test that all three layers work together:

PROMPT โ€” Test the skill activation
I need to review a merchant for the risk committee. Here's the data: Merchant: QuickMart Express Pte Ltd (ID: MC-9921) Sector: Convenience retail, Singapore Monthly transactions: 2,100 โ†’ 8,400 (6-month trend) Average transaction: $12.30 SGD Chargeback rate: 0.4% โ†’ 3.2% (6-month trend) Complaints: 8 in last 30 days (up from 1) PayLater adoption: 45% of transactions Account age: 14 months Generate a full risk assessment.
โœ… Verify the output:
  • Did the skill auto-activate (you didn't need to paste the template)?
  • Are amounts in SGD (steering rule)?
  • Is there a GREEN/AMBER/RED rating (steering rule)?
  • Does every claim cite specific data (skill guardrail)?
  • Are there specific recommended actions with owners (skill template)?

๐ŸŽ‰ What You've Built

  • A steering file with global rules that apply to every conversation
  • A SKILL.md that auto-activates when someone mentions merchant risk
  • A hook that triggers the skill automatically when new data arrives
  • A layered guardrails system โ€” global rules + task-specific constraints
  • A portable skill that works in both Kiro and Claude Cowork

SKILL.md Best Practices

PracticeWhy
Keep SKILL.md under 500 linesLonger files slow down activation and reduce quality
Name: lowercase, hyphens, max 64 charsFollows the Agent Skills standard for portability
Description: include trigger keywordsThis is how the AI decides when to activate your skill
One skill, one jobDon't combine risk assessment + fraud detection in one skill
Include guardrails IN the skillDefense in depth โ€” don't rely only on steering
Add examples of good outputHelps the AI understand what "done well" looks like
Version via gitTrack changes, roll back if quality drops after edits