Loads the Hanami application context before any code, spec, or review work — discovers slices, providers, settings, routes, ROM setup, test framework, DI conventions, and existing patterns, with a mandatory security gate to redact all passwords/credentials/tokens/API keys before note-taking, and a rule to never propose code without first running load-context. The non-negotiable first step for every Hanami task. Trigger words: load context, before I code, what does this app use, match existing style, load-context, show me the app, discover structure, context.
Installation
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Loads the Hanami application context before any code, spec, or review work — discovers slices, providers, settings, routes, ROM setup, test framework, DI conventions, and existing patterns, with a mandatory security gate to redact all passwords/credentials/tokens/API keys before note-taking, and a rule to never propose code without first running load-context. The non-negotiable first step for every Hanami task. Trigger words: load context, before I code, what does this app use, match existing style, load-context, show me the app, discover structure, context.
metadata
{"version":"1.0.0","user-invocable":"true"}
Loading Hanami Application Context
Load the minimum context needed to work safely in a Hanami codebase. Discover structure before proposing changes.
Verify: Test framework, DI conventions, ROM setup.
Rule: Never propose code without first running load-context.
Core Process
[!IMPORTANT]
Security Gate: Always redact all passwords, credentials, tokens, and API keys. Replace them with [REDACTED] or ***** in any notes or summaries.
Pattern reference: For details on sampling, see PATTERNS.md.
Slice inventory — list every slice in slices/:
find slices/ -mindepth 1 -maxdepth 1 -type d
find slices/ -name '*.rb' | head -40
Checkpoint: If slices/ is missing, verify this is a Hanami 2.x application by checking Gemfile or config/app.rb.
Provider inventory — read config/providers/ to identify registered integrations:
cat config/providers/*.rb
Settings — inspect config/settings.rb for environment variables and type constraints:
Test setup — detect testing frameworks and transactional helpers:
cat spec/spec_helper.rb 2>/dev/null
find spec/ -name '*_helper.rb' | head -10
Dependency injection — analyze auto_inject usages and mixin styles:
grep -r 'include Deps' slices/ --include='*.rb' | head -10
grep -r 'auto_inject' slices/ config/ --include='*.rb' | head -10
Existing patterns — sample actions, operations, and repos:
find slices/ -path '*/actions/*.rb' | head -3 | xargs cat
find slices/ -path '*/operations/*.rb' | head -3 | xargs cat
find slices/ -path '*/repositories/*.rb' | head -3 | xargs cat
Completion Gate
Before proceeding to any implementation, populate the 7 sections of the context map. For details on the output format and examples, refer to CONTEXT-OUTPUT-FORMAT.md.
Slice map populated
Provider map populated
Settings summary recorded
Route summary recorded
Test infrastructure identified
DI conventions noted
Pattern notes captured
Integration
Skill
When to chain
configure-providers
After context, to set up or verify provider configuration