Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/patrickclery/ruly/snippets-to-scriptsgit clone --depth 1 https://github.com/patrickclery/rulyWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00011 | $0.02498 |
| Opus 5 | $0.00005 | $0.01249 |
| Sonnet 5 | $0.00002 | $0.00500 |
| Haiku 4.5 | $0.00001 | $0.00250 |
Grade B, and why
snippets-to-scripts scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Asks for rootmediumPrivilege escalation
A mod that escalates privileges can change anything on the machine, not only the project.
sudo mkdir -p "$DEPLOY_DIR" How it starts
The opening of the file, as written. The whole thing — 392 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Snippets to Scripts
Overview
The /snippets-to-scripts command is a Ruly tool that scans markdown files in any repository for bash code snippets and extracts them into standalone shell scripts. This promotes code reuse, maintainability, and testability across your projects.
Path Strategy
When extracting scripts from a target repository:
- Extraction Location: Scripts are created in the target repo (default:
bin/or specified via--output-dir) - Documentation References: Updated to use consistent paths (default:
.ruly/bin/or specified via--reference-path) - Installation Path: Where scripts will be deployed in production environments (.ruly/bin/)
This allows:
- Scripts to be extracted and stored in the target repository
- Documentation to reference the final installation paths
- Flexible deployment strategies per project
Usage
/snippets-to-scripts [file-pattern] [options]
Arguments
file-pattern- Glob pattern for files to scan (default:**/*.md)--output-dir- Where to create extracted scripts (default:bin/)--reference-path- Path to use in documentation references (default:.ruly/bin/)--dry-run- Preview changes without creating files--min-lines- Minimum lines for extraction (default: 5)--interactive- Prompt for each extraction--target-repo- Path to target repository (default: current directory)
Examples
# Extract from all markdown files in current repo
/snippets-to-scripts
# Extract from specific directory
/snippets-to-scripts "docs/**/*.md"
# Extract with custom output and reference paths
/snippets-to-scripts --output-dir="scripts/extracted" --reference-path="bin/project"
# Preview what would be extracted
/snippets-to-scripts --dry-run
# Extract from another repository
/snippets-to-scripts --target-repo="../other-project" "**/*.md"
# Extract only larger snippets
/snippets-to-scripts --min-lines=10
Process
Step 1: Scan for Snippets
The command searches for bash/sh code blocks in markdown:
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 392 lines · 11 tokens per session scan B 713ade6be830
snippets-to-scripts is a command published in the GitHub repository patrickclery/ruly (5 stars, last pushed 7d ago), licensed MIT. It adds 11 tokens to every session and 2,498 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.
implement
Execute the implementation plan by processing and executing all tasks defined in tasks.md.