memento-momentum
Original:🇺🇸 English
Translated
Enforces a 'Document-then-Execute' workflow. Use when an agent needs to run shell commands, execute tests, build projects, or perform any task that should favor established task runners (Makefile, npm run) and be logged to .cmds-by-agents/ for auditability.
4installs
Sourceryuheechul/agent-skills
Added on
NPX Install
npx skill4agent add ryuheechul/agent-skills memento-momentumTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Memento Momentum
This skill guides agents to prioritize project-specific, established commands and ensures that non-trivial command executions are documented with their Intent in a dedicated directory for auditability.
Core Mandates
1. Prioritize Established Commands
Before executing any command to build, test, lint, or run the project, you SHOULD first research the repository for established task runners or scripts.
- Check for: ,
package.json,Makefile,tasks.json,Justfile, or scripts inTaskfile.yml,scripts/, orbin/.tools/ - Action: If an established command exists (e.g., instead of
npm run test), you SHOULD prefer it.vitest - Nuance: Standard, simple calls to established task runners (e.g., ,
npm run test) are considered safe and do not strictly require the creation of a documented script unless they are being modified or are part of a larger sequence.make build
2. Document Non-Trivial Command Executions
To ensure auditability and persistence, AVOID executing bespoke or complex commands directly. Instead, follow this "Document-then-Execute" workflow for non-trivial tasks.
Workflow: Document-then-Execute
- Preparation: Ensure the directory exists (e.g.,
.cmds-by-agents/).mkdir -p .cmds-by-agents - Creation: Use or an equivalent tool to create a shell script in
write_file..cmds-by-agents/- Naming Convention: .
<purpose>-<YYYYMMDD>-<HHMMSS>.sh - Content:
bash
#!/usr/bin/env bash # Intent: [Short description of why you are running this command] set -x [Full command here]
- Naming Convention:
- Permissions: Make the script executable ().
chmod +x - Execution: Run the generated script directly (e.g., ).
./.cmds-by-agents/script.sh
Exceptions
- Simple research, navigation, and management commands (e.g., ,
ls,cd,mkdir,grep) are allowed to be run directly.git status - Standard, direct calls to established project scripts (e.g., ) may be run directly if they don't involve complex flags or environment setup.
npm start
3. Security & Secrets
- No Secrets: NEVER embed sensitive information (API keys, passwords, tokens) in the command script.
- Execution-Time Secrets: Sensitive environment variables must be provided at execution time, either by assuming they are provided by external tooling or by confirming with the user.
- No Leakage: If secrets are being handled, DO NOT use in the script to avoid leaking values in the output.
set -x
Source Control
- Do NOT commit the directory unless explicitly instructed. It should be ignored in
.cmds-by-agents/..gitignore
Example Workflow
- Research: You find in
"test": "vitest".package.json - Simple Action: You may run directly.
npm run test - Bespoke Action: If you need to run tests with specific filters and a custom reporter:
- Create :
.cmds-by-agents/test-filtered-20260312-143005.shbash#!/usr/bin/env bash # Intent: Run only auth tests with verbose output for debugging set -x npm run test -- --filter="auth" --reporter=verbose chmod +x .cmds-by-agents/test-filtered-20260312-143005.sh./.cmds-by-agents/test-filtered-20260312-143005.sh
- Create