Files
brain/user-level-files/hooks/skill-marker.py
T
Дмитрий ed9bade863 feat: extract brain artifacts from Liderra + ~/.claude/
project-files/:
- CLAUDE.md.template (266 lines)
- docs/Pravila_raboty_Claude.template.md (720 lines)
- docs/Plugin_stack_rules.template.md (916 lines)
- docs/Tooling.template.md (613 lines)
- docs/CHANGELOG_claude_md.template.md
- docs/visualizations/hooks-skills-plugins-map.html (3122 lines)
- .mcp.json.template (universal: playwright/github/semgrep; laravel-boost dropped)

user-level-files/:
- hooks/ (10 Python files: skill-marker, skill-check, economy-* x8)
- settings-fragment.json (enabledPlugins + permissions + hooks only)
- marketplaces.json (3 sources)
- plugins-manifest.json (4 plugins pinned with gitCommitSha)
- mcp-user.template.json (magic with <<MAGIC_API_KEY>> placeholder)

Gitleaks scan: 0 findings.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 00:46:51 +03:00

26 lines
710 B
Python

"""PreToolUse hook on matcher 'Skill': writes a per-session flag so the
skill-check hook knows a Skill was invoked at least once in this session.
Reads hook input JSON from stdin. Silent on failure - never blocks the tool."""
import json
import os
import sys
import tempfile
def main() -> None:
try:
data = json.load(sys.stdin)
except Exception:
return
sid = data.get("session_id") or "unknown"
flag = os.path.join(tempfile.gettempdir(), f"claude-skill-{sid}.flag")
try:
with open(flag, "w", encoding="utf-8") as f:
f.write(data.get("tool_input", {}).get("skill", "") or "")
except Exception:
return
if __name__ == "__main__":
main()