source-command-hooks-post-edit

source-command-hooks-post-edit is a skill for Claude Code, Codex from ayushcodes10/echo-mem. It costs 15 tokens per session (634 once invoked), scanned A, original, Apache-2.0.

A post-edit hook that formats an edited file, validates its output, and can save edit context or train patterns.

In plain words
What is it for?
Use it after editing JavaScript, TypeScript, JSON, Python, Go, or other supported files to format them, validate them, or store the edit context.
Why use it?
It catches formatting and validation problems immediately after a file changes and can preserve useful context about the edit.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents); mentions Codex.

Good fit Use it after editing JavaScript, TypeScript, JSON, Python, Go, or other supported files to format them, validate them, or store the edit context.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ayushcodes10/echo-mem/source-command-hooks-post-edit
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ayushcodes10/echo-mem --skill source-command-hooks-post-edit
Clone the repo
git clone --depth 1 https://github.com/ayushcodes10/echo-mem

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for source-command-hooks-post-edit

README.md
[![agentmods](https://agentmods.dev/badge/skills/ayushcodes10/echo-mem/source-command-hooks-post-edit/github.svg)](https://agentmods.dev/skills/ayushcodes10/echo-mem/source-command-hooks-post-edit)
Your own site
<a href="https://agentmods.dev/skills/ayushcodes10/echo-mem/source-command-hooks-post-edit"><img src="https://agentmods.dev/badge/skills/ayushcodes10/echo-mem/source-command-hooks-post-edit/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for source-command-hooks-post-edit

Your own site · 80×15
<a href="https://agentmods.dev/skills/ayushcodes10/echo-mem/source-command-hooks-post-edit"><img src="https://agentmods.dev/badge/skills/ayushcodes10/echo-mem/source-command-hooks-post-edit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 15 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 634 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00015 $0.00634
Opus 5.5 $0.00006 $0.00254
Sonnet 5.5 $0.00003 $0.00127
Haiku 4.5 $0.00002 $0.00063

Measured 2mo ago against content hash e13f2cf22532, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

source-command-hooks-post-edit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/source-command-hooks-post-edit/SKILL.md · 129 lines

How it starts

The opening of the file, as written. The whole thing — 129 lines — stays where its author put it; the contents beside it link to each section on GitHub.

source-command-hooks-post-edit

Use this skill when the user asks to run the migrated source command hooks-post-edit.

Command Template

hook post-edit

Execute post-edit processing including formatting, validation, and memory updates.

Usage

npx Codex-flow hook post-edit [options]

Options

  • --file, -f <path> - File path that was edited
  • --auto-format - Automatically format code (default: true)
  • --memory-key, -m <key> - Store edit context in memory
  • --train-patterns - Train neural patterns from edit
  • --validate-output - Validate edited file

Examples

Basic post-edit hook

npx Codex-flow hook post-edit --file "src/components/Button.jsx"

With memory storage

npx Codex-flow hook post-edit -f "api/auth.js" --memory-key "auth/login-implementation"

Format and validate

npx Codex-flow hook post-edit -f "config/webpack.js" --auto-format --validate-output

Neural training

npx Codex-flow hook post-edit -f "utils/helpers.ts" --train-patterns --memory-key "utils/refactor"

Features

Auto Formatting

  • Language-specific formatters
  • Prettier for JS/TS/JSON
  • Black for Python
  • gofmt for Go
  • Maintains consistency

Memory Storage

  • Saves edit context
  • Records decisions made
  • Tracks implementation details
  • Enables knowledge sharing

Pattern Training

  • Learns from successful edits
  • Improves future suggestions
  • Adapts to coding style
  • Enhances coordination

Output Validation

  • Checks syntax correctness
  • Runs linting rules
  • Validates formatting
  • Ensures quality

Integration

This hook is automatically called by Codex when:

  • After Edit tool completes
  • Following MultiEdit operations
  • During file saves
  • After code generation

Manual usage in agents:

# After editing files
npx Codex-flow hook post-edit --file "path/to/edited.js" --memory-key "feature/step1"

Output

Returns JSON with:

{
  "file": "src/components/Button.jsx",
  "formatted": true,
  "formatterUsed": "prettier",
  "lintPassed": true,
  "memorySaved": "component/button-refactor",
  "patternsTrained": 3,
  "warnings": [],
  "stats": {
    "linesChanged": 45,
    "charactersAdded": 234
  }
}

Read the full file on GitHub · 129 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 129 lines · 15 tokens per session scan A e13f2cf22532

Subscribe to this mod's changes

source-command-hooks-post-edit is a skill published in the GitHub repository ayushcodes10/echo-mem (2 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 15 tokens to every session and 634 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-12.

Related

source-command-hooks-post-edit compared with skills from other repositories

source-command-hooks-post-edit next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
source-command-hooks-post-editayushcodes10/echo-memSkill22mo agoApache-2.0A15Claude Code, Codex
memory-recallzilliztech/memsearchSkill3.0ktodayMITA38Claude Code, Codex
honcho-cliplastic-labs/honchoSkill8.3ktodayAGPL-3.0A61Claude Code
property-reproplastic-labs/honchoSkill8.3ktodayAGPL-3.0A74Claude Code, Codex
brain-doctorjame581/LogseqBrainSkill182d agoMITA114Claude Code
diagnosemycelium-hq/ai-brain-starterSkill61yesterdayMITB110Claude Code
squishmichielhdoteth/squish-memorySkill12yesterdayMITA157Claude Code, Codex