Skip to content
Back to skills

Commands

ASecurity

Standardize adding/updating rules & commands/skills in this repo (scoping, dedupe, naming, DRY symlink structure); use when authoring or revising an agent rule or command.

  • 217 stars
  • 0 votes
  • 0 copies
  • 8 views
  • Added September 1, 2026
blockchaintypescriptshellbashgitapisecurity

Works with

  • claude code
  • cursor
  • api

Security analysis

A100/100

Pro scans all 21 files and shows the line behind each finding

Scanned November 9, 2026

npx -y skills add lifinance/contracts --skill commands --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Commands?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Commands
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/lifinance-commands/badge)](https://www.skillsdirectory.com/skills/lifinance-commands)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: add-rule-or-skill
description: Standardize adding/updating rules & commands/skills in this repo (scoping, dedupe, naming, DRY symlink structure); use when authoring or revising an agent rule or command.
usage: /add-rule-or-skill
---

# Rule & Command Authoring (LI.FI Contracts)

Constraints on duplication, naming, size and cross-references live in `010-agents-authoring`, which auto-loads when you edit `.agents/rules/*.md` or `.agents/commands/*.md`. Numbering ranges are in `.agents/README.md`.

## Symlink layout

```text
.agents/rules/*.md           ← source of truth for rules
  .cursor/rules/*.mdc        ← Cursor (link name keeps .mdc; target is .md)
  .claude/rules/*.md         ← Claude Code

.agents/commands/*.md        ← source of truth for commands
  .cursor/commands/*.md      ← Cursor
  .claude/skills/<name>/SKILL.md  ← Claude Code skill bridge
```

## Hybrid frontmatter (rules)

Scoped rule:

```yaml
---
name: Rule name
description: One-sentence description
globs:           # Cursor: file matching
  - 'src/**/*.sol'
paths:           # Claude Code: file matching (no negation patterns)
  - 'src/**/*.sol'
---
```

Global rule:

```yaml
---
name: Rule name
description: One-sentence description
globs:            # Cursor: match all files
  - '**/*'
alwaysApply: true # Cursor: force-load
                  # Claude Code: omit paths: entirely = always loaded
---
```

Cursor ignores `paths:`; Claude Code ignores `alwaysApply:` and `globs:`; both ignore unknown keys.

Typical scopes by concern:

- Solidity: `**/*.sol`, narrower `src/**`, `src/Facets/**`, `src/Interfaces/**`, `src/Periphery/Receiver*.sol`, `script/**/*.s.sol`, `test/**/*.t.sol`
- TypeScript: `script/**/*.ts`, `tasks/**/*.ts`
- Bash: `**/*.sh`
- GitHub Actions: `.github/workflows/**/*.yml` / `**/*.yaml`
- Audits: `audit/**/*.json`, `audit/**/*.pdf`

## Adding a rule

1. Pick the numbering range from `.agents/README.md`.
2. Create `.agents/rules/<NNN>-<name>.md` with hybrid frontmatter.
3. Symlink:

   ```bash
   ln -sf "../../.agents/rules/<NNN>-<name>.md" ".cursor/rules/<NNN>-<name>.mdc"
   ln -sf "../../.agents/rules/<NNN>-<name>.md" ".claude/rules/<NNN>-<name>.md"
   ```

4. Update the `.agents/README.md` table (name, range, description).

## Adding a command/skill

1. Draft with `/skill-creator`, save to `.agents/commands/<name>.md`.
2. Symlink:

   ```bash
   ln -sf "../../.agents/commands/<name>.md" ".cursor/commands/<name>.md"
   mkdir -p ".claude/skills/<name>"
   ln -sf "../../../.agents/commands/<name>.md" ".claude/skills/<name>/SKILL.md"
   ```

3. Confirm `ls -l .cursor/commands/<name>.md .claude/skills/<name>/SKILL.md` both point into `.agents/commands/`.

Edits to an existing rule or command need no symlink work unless the file is renamed.

## Helper script exit codes

When a skill shells out to a project script (e.g. `bunx tsx script/utils/foo.ts`), use this convention so the skill can branch per target:

- **`0`** — success.
- **`1`** — real error (network, API, malformed input). Report stderr and stop. No retry, no fallback artifact.
- **`2`** — recoverable misconfig (env var missing, optional credential absent). Fall through to the alternative path (manual fallback file, degraded mode) and tell the user which env var to set.

This lets a skill process N targets independently: survivors continue, and only the target that exited `2` gets a fallback.

## Validation

Besides the symlink and README checks in `010-agents-authoring`:

- **Stale references**: grep `.agents/rules/` and `.agents/commands/` for references to removed files.
- **Activation sanity**: editing a facet (`src/Facets/*.sol`) pulls facet + Solidity baseline + architecture/security; a TS script pulls the TS rule (+ security if applicable); audit files pull audit rules.
- **Rule interaction**: identify which rules apply via `globs` to the files involved, and ensure the new rule doesn't conflict with or override higher-priority/global rules.

A rule change must not weaken the smart-contract baseline: single diamond entrypoint with thin facets and selector/storage invariants; Safe + timelock never bypassed, no admin shortcuts; reserved event emission locations and non-EVM receiver rules; input/config validation, no new external-call patterns without prior art, reentrancy and approval hygiene, no new privileged paths; deployment scripts in `script/` and tests mirroring `src/` under `test/solidity/`; audit log schema, report naming and CI expectations.

Files in this skill

  • add-audit.md10 KB
  • add-network.md13.8 KB
  • add-rule-or-skill.md7.2 KB
  • aikido-address-findings.md12.6 KB
  • aikido-update-false-positive-catalog.md3.3 KB
  • aikido-weekly-review.md6.4 KB
  • analyze-tx.md17.7 KB
  • analyze-unverified-contract.md11.5 KB
  • check-open-prs.md12.6 KB
  • check-rotation-status.md9.4 KB
  • create-merged-typings.md8.6 KB
  • create-pr.md15.5 KB
  • deploy-contract-tron.md10 KB
  • deploy-contract.md15.3 KB
  • deprecate-contract.md19.8 KB
  • deprecate-network.md25.9 KB
  • eip7702-atomic-batch.md11.6 KB
  • finish-rollout.md9.6 KB
  • interact-tron.md7.9 KB
  • manage-wallet-funds.md7.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in blockchain →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.