Personal project - A prompt library kept under the same discipline as code: versioned, validated and audited, with a small router that finds the right prompt by name or keyword.
CtxRtr started in mid 2025 as a Contextual Prompt Router built on a 2015 MacBook Pro, alongside the
scripts that kept that machine healthy enough to build on. The router and its prompt library are what remain
in active use. The machine-maintenance scripts are kept, unmaintained, in archive/.
- Routing by name or keyword -
./ops/run-prompt.sh "diagnose ci"findsdiagnose-ci-failure-v1.0.0.mdwithout the exact filename. It matches configured aliases, filenames and the words in them; it does not read plain sentences. - Version Management - Semantic versions, with the latest version selected automatically and older ones archived
- Validation & Auditing -
validate-prompts.sh,audit-prompts.shandanalyze-prompts.shcheck template compliance, metadata and versions before a prompt ships - Prompt Chaining - Run several prompts in sequence with
--chain
Requires macOS (the router copies prompts with pbcopy), bash, jq and python3.
git clone https://github.com/simien/CtxRtr.git
cd CtxRtr
./tests/quick-test.sh --non-interactive# Route by keyword; the prompt lands on your clipboard
./ops/run-prompt.sh "diagnose ci"
./ops/run-prompt.sh "find bugs"
# Print instead of copying
./ops/run-prompt.sh --dry-run "create todo"
# List every prompt, or search by term
./ops/run-prompt.sh --list
./ops/run-prompt.sh --search docker
# Chain prompts in sequence
./ops/run-prompt.sh --chain diagnose-ci generate-git-commit-message
# Version management, analytics and validation
./scripts/audit-prompts.sh --dry-run
./scripts/analyze-prompts.sh
./scripts/validate-prompts.sh./scripts/pre-release-sanitizer.sh --dry-run
./scripts/create-release.shPrompts treated like code: versioned, validated, audited and measured
- Alias and keyword matching - Configured aliases first, then filenames, then the words of the input
- Context Injection - Dynamic file inclusion with
{{include:path/to/file}} - Version Management - Automatic latest-version selection with semantic versioning
- Quality Control - Validation and analytics
- Automated Version Management - Outdated-version detection and archiving
Illustrative snapshot: captured 2025-07-28, kept here to show what
analyze-prompts.shreports. Run it yourself for current numbers
■ Prompt Structure Analysis
==========================
Total prompts: 24 (active)
Archived prompts: 1 (properly managed)
Total categories: 5
Prompts by category:
code-analysis 5 (20%)
documentation-generation 5 (20%)
meta-prompts 3 (12%)
system-optimization 5 (20%)
workflow-management 6 (25%)
[#] See prompts/README.md for the prompt system documentation
[#] See docs/guides/prompt-system-overview.md for the full architecture
./ops/run-prompt.sh- Prompt router with chaining support./scripts/validate-prompts.sh- Template compliance and metadata validation./scripts/analyze-prompts.sh- Usage pattern and complexity analytics./scripts/audit-prompts.sh- Outdated-version detection and archiving
./scripts/pre-release-sanitizer.sh- Scans for personal information before a release./scripts/create-release.sh- Release management./scripts/enforce-organization-standards.sh- Directory and README standards./scripts/sync-ide-settings.sh- Copies this project's IDE settings into Cursor or VS Code (changes your editor settings)
[#] See ops/README.md and scripts/README.md for details
- Prompts System - The prompt library and its categories
- Prompt System Overview - Architecture and advanced features
- Meta-Prompts - Conversation management and utilities
- Test Suite - What the tests check
- Archive - The retired 2015 MacBook tooling
- Contributing Guidelines - Development standards
- Security Policies - Security and audit information
This is an experimental personal project, and contributions are welcome. See the Contributing Guidelines.
If you discover a security vulnerability, please report it privately. See the Security Policy.
This project is licensed under the MIT License. See the LICENSE file.
Maintainer: simien Issues and questions: GitHub Issues Security reports: see SECURITY.md
prompts/- Versioned, validated, audited prompt libraryops/- The router:run-prompt.sh, its libraries inlib/and helpers inutils/config/- Router configuration and project settingsscripts/- Prompt validation and analytics, release and repository toolstests/- Repository-only test suitedocs/- Guides and standardssecurity/- Security policies and audit reportsarchive/- Retired 2015 MacBook maintenance tooling, kept as a recordexamples/- Usage examples.github/- GitHub workflows and templates