3. Claude¶
pconfigs includes a tool to install Claude rules and skills into your project. These rules teach Claude how to write pconfigs code. Users may wish to modify some coding conventions by copying and customizing the rules.
3.1. Installation¶
Install the rules and skills to your project:
$ python -m pconfigs.claude install
Pass -y to skip confirmation prompts (useful in scripts):
$ python -m pconfigs.claude install -y
This creates:
.claude/pconfigs/— Rule files that teach Claude pconfigs conventions.claude/skills/pconfigs-*/— Skills for printing and testing configs.claude/installation_test/— Test suite to verify rule installationCLAUDE.md— Entry point that imports the rules (created if it doesn’t exist)
Configure your environment¶
After installation, update the Environment section in your CLAUDE.md with your project’s Python environment:
## Environment
- Python environment: `my_project`
- Activation: `conda activate my_project`
This tells Claude how to run pconfigs commands in your project.
To install to a different directory, pass the path: python -m pconfigs.claude install /path/to/project.
3.2. Installation test¶
The installer includes a test suite to verify the agent has learned the rules correctly. Run the test in two conversations:
Conversation A — send:
Take the test. @.claude/installation_test/INSTRUCTIONS.mdConversation B — send:
Score the test. @.claude/installation_test/INSTRUCTIONS.mdOpen
TEST_SCORE.mdto review.
To re-run the test, delete the answers/, scores/, and TEST_SCORE.md from .claude/installation_test/ and re-run the installer to restore the test files.
3.3. What gets installed¶
Rules¶
The installer copies these rule files to .claude/pconfigs/:
File |
Description |
|---|---|
|
Repo-wide coding policies and pconfig modification rules |
|
Core pconfigs usage patterns and conventions |
|
Naming conventions for classes, configs, and variables |
|
Rules for wrapping external libraries |
|
Patterns for computed config fields |
Skills¶
The installer creates these skill directories in .claude/skills/:
Skill |
Description |
|---|---|
|
Print resolved config values with |
|
Test pconfig files with |
3.4. Other commands¶
List available rules and skills¶
$ python -m pconfigs.claude list
Available rules:
external_libs
naming
pconfigs
policies
pproperty
Available skills:
pconfigs-print
pconfigs-test
View a specific rule or skill¶
$ python -m pconfigs.claude show pconfigs
$ python -m pconfigs.claude show pconfigs-print
Print paths to bundled assets¶
$ python -m pconfigs.claude path
Rules: /path/to/site-packages/pconfigs/claude_assets/rules
Skills: /path/to/site-packages/pconfigs/claude_assets/skills
3.5. Existing projects¶
When your project already has a CLAUDE.md, the installer:
Copies rule files to
.claude/pconfigs/(overwrites if they exist)Copies skill files to
.claude/skills/pconfigs-*/Appends missing
@.claude/pconfigs/...imports toCLAUDE.md
The installer detects existing imports and won’t add duplicates.
3.6. Manual installation¶
If you prefer not to use the installer, you can manually:
Copy rules from the package location (
python -m pconfigs.claude path)Add imports to your
CLAUDE.md:
@.claude/pconfigs/policies.md
@.claude/pconfigs/pconfigs.md
@.claude/pconfigs/naming.md
@.claude/pconfigs/external_libs.md
@.claude/pconfigs/pproperty.md