Picocode is a Rust-based coding agent for CI workflows and small codemods. It integrates with Claude to automate code changes, reducing manual effort for developers. Connects to CI pipelines and version control systems.
git clone https://github.com/jondot/picocode.gitPicocode is a minimal, high-performance Rust coding agent designed for developers who need a lightweight assistant for code automation tasks. It integrates with multiple LLM providers including Anthropic Claude, OpenAI, Google Gemini, and DeepSeek through a single compact binary with no heavy dependencies. The tool supports interactive CLI usage, scriptable recipes for CI/CD automation, and persona-driven analysis where you can switch between expert profiles (Architect, Security, Zen Master, etc.) to change how the agent approaches code review and modification. It includes a comprehensive toolkit with filesystem operations, regex search, bash execution, and browser automation, while prioritizing safety by requiring confirmation for destructive actions by default. Developers can use picocode for security reviews, project analysis, codemod automation, and integration into existing development workflows.
[{"step":"Define the codemod goal","action":"Specify the change you want to automate (e.g., 'Replace `println!` with a logging macro' or 'Add null checks to all public API functions'). Use clear, actionable language.","tip":"Start with a small, scoped change (e.g., one file type or module) to validate the codemod before scaling."},{"step":"Configure the pattern and conditions","action":"Use Picocode's CLI flags to target specific files (`--pattern`), conditions (`--condition`), and exclusions (`--exclude`). For example: `--pattern \"src/**/*.rs\" --condition \"contains('unwrap()')\"`.","tip":"Use `--dry-run` to preview changes without applying them. Check Picocode's documentation for advanced pattern matching (e.g., regex support)."},{"step":"Generate and review the diff","action":"Run `picocode apply` with your configuration. Review the generated diff in your terminal or CI logs. Use `--output diff` to save the diff to a file for further review.","tip":"Look for false positives (e.g., `unwrap()` in tests or examples) and adjust the `--pattern` or `--condition` flags accordingly."},{"step":"Apply and commit changes","action":"Use `--commit` to automatically commit the changes to a new branch and open a PR. Alternatively, apply changes locally and commit manually.","tip":"For CI integration, configure Picocode to run in your pipeline (e.g., GitHub Actions) and post comments with the diff summary."},{"step":"Validate and iterate","action":"Run your test suite and manual QA checks. If issues arise, refine the codemod or revert the changes.","tip":"Use Picocode's `--rollback` flag to undo changes if needed. Keep a record of successful codemods for reuse in future projects."}]
Automated security code reviews with the security persona
CI/CD pipeline automation using pre-defined recipes
Multi-file codemod and refactoring tasks
Project analysis and improvement suggestions
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/jondot/picocodeCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Use Picocode to automate a codemod for [PROJECT_NAME]. The goal is to [SPECIFIC_CHANGE_DESCRIPTION] in all files matching [FILE_PATTERN]. Apply the change only if [CONDITIONAL_LOGIC] is met. Generate a diff showing the proposed changes and explain the impact on the codebase. Include a command to run the codemod via Picocode CLI: `picocode apply --project [PROJECT_NAME] --pattern [FILE_PATTERN] --change [CHANGE_DESCRIPTION]`.
### Picocode Codemod Proposal: Replace `unwrap()` with `expect()` in Error Handling
**Project:** `inventory-service` (Rust-based microservice)
**Files Affected:** 12 files in `src/error.rs`, `src/handlers/*.rs`, and `src/models/*.rs`
**Pattern:** `unwrap()` calls in `Result` or `Option` contexts where the error message is unclear
**Proposed Changes:**
```diff
- let user = db.get_user(id).unwrap();
+ let user = db.get_user(id).expect("Failed to fetch user with ID: {id}");
- let config = Config::load().unwrap();
+ let config = Config::load().expect("Configuration file missing or invalid");
```
**Impact Analysis:**
1. **Safety:** Eliminates potential panics in production by replacing silent failures with descriptive errors.
2. **Debugging:** Error messages now include context (e.g., user ID or config file path), reducing mean time to resolution (MTTR) for incidents.
3. **Performance:** No measurable impact; `expect()` has identical runtime behavior to `unwrap()`.
4. **Risk:** Low. The change is additive and does not modify logic—only error messages. Test coverage remains unchanged.
**Commands to Apply:**
```bash
# Preview changes (dry run)
picocode apply --project inventory-service --pattern "src/**/*.rs" --change "replace_unwrap_with_expect"
# Apply changes
picocode apply --project inventory-service --pattern "src/**/*.rs" --change "replace_unwrap_with_expect" --commit
```
**Next Steps:**
1. Review the diff in your terminal or CI logs.
2. Run the test suite: `cargo test` to ensure no regressions.
3. Commit the changes if the diff is acceptable: `git commit -m "chore: replace unwrap() with expect() for better error context"`.
**Note:** Picocode will automatically create a PR in your GitHub repository if the `--commit` flag is used. The PR will include the diff and a summary of the changes.AI assistant built for thoughtful, nuanced conversation
Hey, what’s on your mind today?
Cloud ETL platform for non-technical data integration
Get more done every day with Microsoft Teams – powered by AI
Customer feedback management made simple
Enterprise workflow automation and service management platform
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan