Lesson 5 - Power Features: References, Scripts, and Assets
Go beyond plain instructions by bundling templates, automation scripts, and static data with your skill. Learn when to externalize, how to reference files safely, and how to keep everything maintainable.
Duration: 2-2.5 hours
Learning Objectives
By the end of this lesson, you will be able to:
- ✓Design a reference library that keeps SKILL.md focused while providing battle-tested templates and examples.
- ✓Author lightweight scripts the AI can invoke for validation or automation, with clear safeguards.
- ✓Package assets (JSON, CSV, configs) and reference them consistently from the instruction body.
- ✓Document every supporting file so maintainers understand why it exists.
Videos
When to Externalize: SKILL.md Isn't Enough
Recognize the thresholds for moving templates, checklists, and data out of SKILL.md and into supporting directories.
Duration: 6 minutes
Video coming soon
References in Action: Templates and Examples
Build a reference library for the deploy-checklist skill with a template and a good/bad example pair.
Duration: 10 minutes
Video coming soon
Scripts and Assets: Automation and Data
Add a validation script and a configuration asset to the deploy-checklist skill.
Duration: 8 minutes
Video coming soon
Key Concepts
Running Example: deploy-checklist with Supporting Files
Reference Library Patterns
Script Guardrails
Referencing Files from SKILL.md
Supporting Files Documentation Table
Common Mistakes & Pitfalls
❌ Adding directories before you need them
An empty scripts/ folder adds complexity without value. Wait until you have an actual script to write. Most skills start with just SKILL.md.
❌ Using absolute paths to reference files
'references/template.md' works everywhere. '/Users/jane/skills/template.md' breaks the moment someone else uses the skill.
❌ Putting everything in one massive reference file
One template, one style guide, and three examples in a single file is hard to maintain. Keep each file focused on one thing.
❌ Forgetting to make scripts executable
Scripts need execute permissions: 'chmod +x scripts/check.sh'. Without this, the AI can't run them and you'll get a confusing error.
❌ Not documenting supporting files
Without a Supporting Files table, maintainers have to guess what each file does. A 5-line table prevents hours of confusion.
❌ Scripts that modify files outside the skill directory
Skills should validate and report, not silently change things. If a script needs to modify files, make that explicit in SKILL.md so it's reviewable.
Exercises
Exercise 1: Build a Reference Template
20 minutesCreate references/ with a template file that defines your skill's output format. Update SKILL.md to reference it explicitly.
Expected Output:
A references/ directory with a template file, and SKILL.md updated to use it.
Success Criteria:
- •Reference file contains a clear, complete output template.
- •SKILL.md workflow includes a step: 'Read references/[file] and follow its structure.'
- •Tested the skill — confirmed the AI follows the template consistently.
- •Added the file to the Supporting Files table in SKILL.md.
Exercise 2: Add a Validation Script
25 minutesCreate scripts/ with a simple validation script. Wire it into your SKILL.md workflow. Test it manually first, then via the skill.
Expected Output:
A scripts/ directory with an executable script, referenced from SKILL.md.
Success Criteria:
- •Script has a descriptive header comment (purpose, inputs, outputs).
- •Script is executable (chmod +x) and tested manually.
- •SKILL.md workflow includes a step to run the script.
- •Tested the full skill workflow including the script.
Exercise 3: Package an Asset
20 minutesAdd one static data file to assets/ that the AI needs to reference during the workflow (JSON config, checklist data, etc.).
Expected Output:
An assets/ directory with a data file, referenced from SKILL.md.
Success Criteria:
- •Asset file contains structured data the AI reads during the workflow.
- •SKILL.md includes a step: 'Read assets/[file] to determine...'
- •Test confirmed the AI used the asset data correctly.
- •File documented in the Supporting Files table.
Lesson Reflection
Take a moment to reflect on what you've learned:
- 1. Does your skill need supporting files right now, or are you adding them prematurely?
- 2. What repetitive validation in your workflow could be automated with a simple script?
- 3. If you shared your skill with someone who's never seen it, which reference files would help them understand the expected output?
- 4. How would adding a good/bad example pair change the consistency of your skill's output?