Turn Repeated Coding Agent Prompts Into Custom Slash Commands
Automate your daily development workflow by converting frequent agent requests into reusable CLI shortcuts.
1Automating Repetitive Agent Tasks
Developers often type the same complex prompts into coding agents like Claude Code, Codex, or Cursor. This new tool, faq-shortcuts, identifies these patterns by analyzing your local history. It transforms frequent, long-winded requests into concise slash commands, significantly streamlining your daily interaction with AI-powered coding assistants and improving overall development efficiency.
2Installation and Setup Process
The tool requires Python 3.9+ and Git installed on macOS, Linux, or Windows. You clone the repository into your local agents directory and create a symbolic link or junction to the skills folder. Once linked, your coding agent automatically recognizes the new skill, allowing you to trigger shortcut discovery immediately.
3Identifying Your Frequent Asks
To find your most repeated prompts, simply ask your agent 'what do I keep asking in this project?' or run the /faq-shortcuts command. The tool generates a table showing your most frequent requests and their usage counts. This data-driven approach helps you identify which specific tasks deserve a dedicated, permanent shortcut.
4Creating Custom Project Shortcuts
Once you select a frequent prompt, the tool creates a SKILL.md file within your project's .claude/skills directory. This file defines the shortcut name, a description, and the underlying script or command it executes. These shortcuts are committed to your repository, ensuring that your entire team can benefit from the standardized automation.
5Technical Mechanism of Extraction
The core of the tool is a Python script that parses local history files from Claude Code, Codex, and Cursor. It filters out subagent turns and scripted runs to focus solely on your direct input. The extractor processes these logs locally, ensuring that your sensitive prompt history never leaves your machine during analysis.
6Privacy and Security Measures
Security is prioritized through automatic redaction of sensitive data. Before printing any output, the script identifies and masks API keys, JWTs, bearer tokens, and password patterns. While this acts as a safety net, users should remain cautious, as names and emails may still appear in the generated history lists.
7Advanced Filtering and Customization
The extractor supports various flags to refine your search, such as --since for date filtering or --source to isolate history from specific agents. You can also adjust the --max-len parameter to include longer prompts or use --format jsonl for structured data output, making the tool highly adaptable to complex, multi-agent development workflows.
8Verification Over Blind Trust
Shortcuts are designed to verify outcomes rather than relying on previous agent claims. By pointing to existing project scripts and status checks, commands like /sent provide real-time confirmation of actions. Furthermore, any shortcut that performs a write or send operation includes a mandatory dry run, requiring your explicit approval before execution.
9Cross-Platform Compatibility Details
The tool provides robust support for Windows via directory junctions, which avoid the need for administrative privileges or Developer Mode. Linux and macOS users benefit from standard symlinks. All platforms are covered by continuous integration testing, ensuring that the installation and extraction processes remain stable across different operating systems and environments.
10Strategic Workflow Optimization
By converting intent-based prompts into standardized commands, developers reduce cognitive load and eliminate redundant typing. This tool shifts the focus from crafting prompts to executing verified, repeatable workflows. Implementing these shortcuts creates a more predictable development cycle, allowing teams to maintain consistency across projects while leveraging the full power of AI.