claude-keysmith  by Jia-Ethan

Local installer for Claude Code instruction management

Created 4 weeks ago

New!

272 stars

Top 94.6% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

Jia-Ethan/claude-keysmith provides a localized utility for managing Claude Code's persistent instructions, specifically targeting CLAUDE.md import blocks and separate Markdown instruction files. It offers a safer, repeatable method for users to integrate custom instructions without directly altering Claude Code's core binaries, network traffic, or sensitive credentials. This tool is designed for Claude Code users seeking to organize and deploy local instruction sets efficiently and securely.

How It Works

The tool operates by inserting a distinct, uninstallable import block into the user's or project's CLAUDE.md or CLAUDE.local.md file. Concurrently, it stores the actual instruction Markdown content in a dedicated keysmith-managed directory. This approach ensures that only the tool's managed blocks are affected, preventing unintended modifications to the user's primary Claude Code memory files.

Quick Start & Requirements

  • Primary install/run command: Execute the Python script claude-instruct.py directly. Example: python3 claude-instruct.py install --scope project --project-dir /path/to/repo.
  • Prerequisites: Python 3.x environment. Claude Code must be installed.
  • Links:

Highlighted Details

  • Safety Defaults: Operations default to a dry-run mode unless explicitly confirmed with --yes. Backups are automatically created before any file modifications.
  • Scope Management: Supports user (~/.claude/CLAUDE.md), project (<repo>/CLAUDE.md), and local (<repo>/CLAUDE.local.md) scopes for instruction placement.
  • Atomic Operations: Ensures safe filename validation and atomic writes for modifications.
  • Non-Intrusive: Strictly avoids patching binaries, intercepting network traffic, saving credentials, or altering Claude Code settings/processes.

Maintenance & Community

This project is part of a series including codex-keysmith and zcode-keysmith. It accepts feedback from the "LINUX DO 社区". No direct community links (e.g., Discord, Slack) are provided.

Licensing & Compatibility

  • License: MIT License.
  • Compatibility: The MIT license is permissive, allowing for commercial use and integration into closed-source projects without significant restrictions.

Limitations & Caveats

Currently distributed as a single Python script, not a pip-installable package. The tool only manages import blocks and instruction files it inserts itself and does not verify if Claude Code successfully loads these instructions. It does not manage other Claude Code configuration files like .claude/rules/, settings, hooks, or permissions.

Health Check
Last Commit

3 weeks ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
1
Star History
274 stars in the last 29 days

Explore Similar Projects

Feedback? Help us improve.