Automated summary
Manages a repository's secrets through chezmoi with a project-local config, Bitwarden templates, GPG encryption, and the .secrets submodule.
Strengths
- Gives the exact command per operation (add, edit, list, apply, diff) including the mandatory --config flag
- Documents the source-of-truth chain from Bitwarden to .env.bitwarden to chezmoi templates to target files
- Calls out real pitfalls: uncommitted submodule pointer, direct chezmoi add being refused, accidentally hitting the global config
- The chezmoi-add-secret.sh helper handles dot_ and encrypted_ prefixes and auto-sources the Bitwarden session
Limitations
- Heavily repo-specific: paths, the GPG key ID and the config location do not transfer to other projects
- Assumes chezmoi, the Bitwarden CLI and GPG are already installed and configured
- Does not address secret rotation or leak-response procedures
Use it whenever you need to add, edit, list or apply a chezmoi-managed secret in this repository.
Avoid it for secrets outside this repo or for projects that rely on a standard global chezmoi config.
Security analysis
CautionThe skill is a legitimate secrets-management workflow using chezmoi, Bitwarden, GPG, and git. It contains no exfiltration, destructive commands, obfuscated payloads, or safety-disabling instructions, but it does handle live secrets and executes repo-local scripts with file-modifying operations, so it warrants caution rather than a clean safe rating.
- •Instructs sourcing a Bitwarden session script (`source_bitwarden_session.sh`), exposing `BW_SESSION` to the shell and relying on a repo-local script not included in the SKILL.md.
- •Runs `chezmoi apply` and `merge`, which can modify or overwrite target project files; `diff` is recommended but not enforced before applying.
- •References helper scripts (`chezmoi-add-secret.sh`, `source_bitwarden_session.sh`) whose actual behavior cannot be verified from this file alone.
Examples
Add DATABASE_URL as a new chezmoi-managed secret in this repo and make sure it gets encrypted.Source my Bitwarden session, apply the chezmoi secrets with the project config, and show me the diff before anything lands.chezmoi seems to be editing the wrong files - check whether this repo's .chezmoi.toml is being used and list the managed files.name: secrets-sync description: "Use when the user adds, edits, lists, or applies chezmoi-managed secrets; syncs Bitwarden sessions; runs GPG encryption on project files; or works with the .secrets submodule. Also use when troubleshooting chezmoi config path issues in this repository."
secrets-sync
All chezmoi commands in this repo require --config ./.chezmoi.toml because the config is project-local, not in ~/.config/chezmoi.
Source-of-Truth Chain
digraph secrets {
rankdir=LR;
node [shape=box];
"Bitwarden" -> ".env.bitwarden" -> "chezmoi templates\n(.secrets/)";
"chezmoi templates\n(.secrets/)" -> "chezmoi apply" [shape=plaintext];
"chezmoi apply" -> "target files\n(project root)";
}
Quick Reference
| Operation | Command |
|---|---|
| Add new secret | ./dotfile-utils/scripts/chezmoi-add-secret.sh [--encrypt] <path> |
| Edit existing secret | Edit file in place, then chezmoi --config ./.chezmoi.toml merge <path> to sync back to source |
| List managed files | chezmoi --config ./.chezmoi.toml managed |
| Apply secrets | chezmoi --config ./.chezmoi.toml apply |
| Check diff | chezmoi --config ./.chezmoi.toml diff |
| Source Bitwarden | source ./dotfile-utils/scripts/source_bitwarden_session.sh |
| Stage in submodule | chezmoi --config ./.chezmoi.toml git -- add <chezmoi-path> |
Workflow
- Determine operation: add / edit / list / apply
- If working with encrypted or Bitwarden-templated secrets, source the Bitwarden session first (auto-sourced by helper script when
.env.bitwardenexists orBW_SESSIONis set) - Run the correct command from the table above
- Verify with
managedordiff - Stage changes inside
.secretssubmodule - Remind user to commit the updated submodule pointer in the parent repo
Key Facts
- Config flag required: Every
chezmoiinvocation needs--config ./.chezmoi.toml - GPG key ID:
9A4ABBA2F90BCF19 .secretsis a git submodule -- changing files inside it means the parent repo sees a dirty submodule pointer that must also be committedchezmoi-add-secret.shhandles dot-prefix conversion (.env->dot_env) andencrypted_prefix automatically; it also auto-sources Bitwarden if.env.bitwardenexists- Source dir:
.secrets/(set viasourceDirin.chezmoi.toml) - Dest dir: project root
.(set viadestDirin.chezmoi.toml)
Common Mistakes
- Running bare
chezmoiwithout--config ./.chezmoi.toml(will use~/.config/chezmoiand operate on the wrong source) - Forgetting to commit the submodule pointer in the parent repo after changing
.secrets - Using
chezmoi adddirectly instead ofchezmoi-add-secret.shfor project files (chezmoi refuses to add files from its own dest dir)
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/secrets-sync-with-chezmoi-mrx3xwj6/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/secrets-sync-with-chezmoi-mrx3xwj6' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/secrets-sync-with-chezmoi-mrx3xwj6/download' --output '.skill-downloads/secrets-sync-with-chezmoi-mrx3xwj6/SKILL.md.part' && mv '.skill-downloads/secrets-sync-with-chezmoi-mrx3xwj6/SKILL.md.part' '.skill-downloads/secrets-sync-with-chezmoi-mrx3xwj6/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
Original excerpt: Quick Reference
| Operation | Command |
|---|---|
| Add new secret | ./dotfile-utils/scripts/chezmoi-add-secret.sh [--encrypt] <path> |
| Edit existing secret | Edit file in place, then chezmoi --config ./.chezmoi.toml merge <path> to sync back to source |
| List managed files | chezmoi --config ./.chezmoi.toml managed |
| Apply secrets | chezmoi --config ./.chezmoi.toml apply |
| Check diff | chezmoi --config ./.chezmoi.toml diff |
| Source Bitwarden | source ./dotfile-utils/scripts/source_bitwarden_session.sh |
| Stage in submodule | chezmoi --config ./.chezmoi.toml git -- add <chezmoi-path> |
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/secrets-sync-with-chezmoi-mrx3xwj6/SKILL.md' && test -s '.skill-downloads/secrets-sync-with-chezmoi-mrx3xwj6/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/secrets-sync' && cp -R '.skill-downloads/secrets-sync-with-chezmoi-mrx3xwj6' '.claude/skills/secrets-sync'Codex
test -f '.skill-downloads/secrets-sync-with-chezmoi-mrx3xwj6/SKILL.md' && test -s '.skill-downloads/secrets-sync-with-chezmoi-mrx3xwj6/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/secrets-sync' && cp -R '.skill-downloads/secrets-sync-with-chezmoi-mrx3xwj6' '.agents/skills/secrets-sync'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/secrets-sync-with-chezmoi-mrx3xwj6'openskills read 'secrets-sync-with-chezmoi-mrx3xwj6'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/secrets-sync-with-chezmoi-mrx3xwj6/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
DeFi AMM Security
Security
Security checklist for Solidity AMM contracts, liquidity pools, and swap flows. Covers reentrancy, donation attacks, oracle manipulation, slippage, and integer math.
Semgrep Rule Creator
Security
Creates custom Semgrep rules for detecting security vulnerabilities, bug patterns, and code patterns. Includes test-first methodology, taint mode support, and validation steps. Helps when building targeted static analysis detections.
Dev Toolbar Review Guide
Security
Safety rules for the dev toolbar, PostHog client, and feature flags. Use when reviewing changes to dev-tools and related files, covering environment guards, override cookies, and SSE stream safety.