generic-automation-and-it/smooth-ai-stockanalysis / .agents/skills/manage-rule-system
manage-rule-system
VerifiedConvention for creating, updating, or modifying rule files in .agents/rules/. Use when adding, editing, or restructuring rule files to ensure compatibility across Claude Code, GitHub Copilot, Cursor, and OpenAI Codex.
| File | Kind | Size |
|---|---|---|
| AGENTS.md | markdown | 1.1 KB |
| SKILL.md | skill md | 5.8 KB |
| agents/openai.yaml | config | 293 B |
| scripts/inject-context.shexecutable | script | 1.0 KB |
scripts/inject-context.sh
View on GitHub#!/usr/bin/env bash
# Skill: manage-rule-system
# Emits SKILL.md content inside a <context-auto-loaded> envelope, deduped per session.
# Invoked by the UserPromptSubmit hook when the prompt mentions rule creation/editing.
set -euo pipefail
SKILL_DIR=$(cd -P "$(dirname "$0")/.." && pwd -P)
SKILL_MD="${SKILL_DIR}/SKILL.md"
[ -f "$SKILL_MD" ] || exit 0
REPO_ROOT=$(git -C "$SKILL_DIR" rev-parse --show-toplevel 2>/dev/null || true)
ROOT="${REPO_ROOT:-$SKILL_DIR}"
SESSION_ID="${CLAUDE_SESSION_ID:-${CODEX_SESSION_ID:-${CODEX_THREAD_ID:-${COPILOT_SESSION_ID:-${GITHUB_COPILOT_SESSION_ID:-${PPID:-$$}}}}}}"
SAFE_SESSION_ID=$(printf '%s' "$SESSION_ID" | tr -c 'A-Za-z0-9._-' '_')
TRACKER="/tmp/.skill_ctx_manage-rule-system_${SAFE_SESSION_ID}"
touch "$TRACKER" 2>/dev/null || exit 0
if grep -qxF "$SKILL_MD" "$TRACKER" 2>/dev/null; then
exit 0
fi
printf '%s\n' "$SKILL_MD" >> "$TRACKER" || true
rel="${SKILL_MD#"$ROOT"/}"
printf '<context-auto-loaded>\n\n## Context: %s\n' "$rel"
cat "$SKILL_MD" 2>/dev/null || true
printf '\n</context-auto-loaded>\n'
exit 0
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |