{"id":"9662253d-e9c5-4ea7-bcfc-12ddf4bcc535","entityType":"agent","slug":"clawhub-h4444433333-skill-graph-for-analogical-reasoning","name":"skill-graph-for-analogical-reasoning","canonicalUrl":"https://www.xpersona.co/agent/clawhub-h4444433333-skill-graph-for-analogical-reasoning","canonicalPath":"/agent/clawhub-h4444433333-skill-graph-for-analogical-reasoning","generatedAt":"2026-10-12T21:25:01.090Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-12T00:11:20.540Z","emptyReason":null},"description":"Skill Graph for Analogical Reasoning. Build a graph over SKILL.md skills, choose one primary skill, and retrieve complementary support instead of naively att...","descriptionLabel":"Source description","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 970 downloads reported by the source. Last updated 10/12/2026.","installCommand":"clawhub skill install s175hh79c5hqmmg8b7ec9gq43183kws2:skill-graph-for-analogical-reasoning","sourceUrl":"https://clawhub.ai/h4444433333/skill-graph-for-analogical-reasoning","homepage":"https://clawhub.ai/h4444433333/skills/skill-graph-for-analogical-reasoning","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/h4444433333/skill-graph-for-analogical-reasoning","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/h4444433333/skills/skill-graph-for-analogical-reasoning","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":60,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"skill-graph-for-analogical-reasoning technical dossier on Xpersona with agent coverage, OPENCLEW support, and live trust metadata."},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-12T00:11:20.540Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-12T00:11:20.540Z","emptyReason":null},"stars":null,"forks":null,"downloads":970,"likes":null,"task":null,"library":null,"packageName":null,"latestVersion":"1.0.4","tractionLabel":"970 downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-12T00:11:20.465Z","emptyReason":null},"lastUpdatedAt":"2026-10-12T00:11:20.540Z","lastCrawledAt":"2026-10-12T00:11:20.465Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-13T00:11:20.465Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.4","createdAt":"2026-05-28T02:47:02.457Z","changelog":"- Added _meta.json for enhanced metadata support. - Improved guidance for handling supporting skills: only use a supporting skill if it provides clear, non-conflicting value for the current task. - Clarified instructions in \"How to interpret results\" for better adoption of skill roles.","fileCount":12,"zipByteSize":24860},{"version":"1.0.3","createdAt":"2026-05-11T05:35:12.792Z","changelog":"No changes detected in this version. - Version 1.0.3 is functionally identical to the previous release. No modifications were made to any files.","fileCount":12,"zipByteSize":24775},{"version":"1.0.2","createdAt":"2026-05-11T05:27:45.846Z","changelog":"- No file changes detected in this version. - Functionality and documentation remain the same as the previous release.","fileCount":11,"zipByteSize":23747},{"version":"1.0.1","createdAt":"2026-05-11T04:18:55.986Z","changelog":"- Improved accuracy and clarity in how the code is called: primary execution now always uses the included helper script before external binaries. - Expanded guidance for runtime: provided more detail on fallback behaviors and how to use the CLI, Python package, or direct users to GitHub if needed. - Updated documentation to clarify analogical reasoning goals and benefits, including improved descriptions of result interpretation and system differentiation. - Added \"GitHub version\" instructions for both OpenClaw skill installation and direct Python package usage.","fileCount":11,"zipByteSize":23747},{"version":"1.0.0","createdAt":"2026-05-11T01:39:33.527Z","changelog":"Skill Graph for Analogical Reasoning — first release. - Enables building, querying, and visualizing a skill graph for analogical reasoning across SKILL.md folders. - Differentiates primary skills, supporting skills, and fallback options to improve retrieval beyond simple similarity. - Provides CLI-based commands: build, query, and look, with clear code execution rules and guidance. - Designed to plug into local Python3 environments, with instructions if dependencies are missing. - Full usage and interpretation details included in documentation.","fileCount":11,"zipByteSize":23258}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s175hh79c5hqmmg8b7ec9gq43183kws2:skill-graph-for-analogical-reasoning","setupComplexity":"low","setupSteps":["Install using `clawhub skill install s175hh79c5hqmmg8b7ec9gq43183kws2:skill-graph-for-analogical-reasoning` in an isolated environment before connecting it to live workloads.","No published capability contract is available yet, so validate auth and request/response behavior manually.","Review the upstream CLAWHUB listing at https://clawhub.ai/h4444433333/skill-graph-for-analogical-reasoning before using production credentials."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-h4444433333-skill-graph-for-analogical-reasoning/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-h4444433333-skill-graph-for-analogical-reasoning/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-h4444433333-skill-graph-for-analogical-reasoning/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-h4444433333-skill-graph-for-analogical-reasoning/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-h4444433333-skill-graph-for-analogical-reasoning/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-h4444433333-skill-graph-for-analogical-reasoning/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-12T21:25:01.088Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-h4444433333-skill-graph-for-analogical-reasoning/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-h4444433333-skill-graph-for-analogical-reasoning/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-h4444433333-skill-graph-for-analogical-reasoning/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-h4444433333-skill-graph-for-analogical-reasoning/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-12T00:11:20.540Z","emptyReason":null},"readme":"Skill: skill-graph-for-analogical-reasoning\n\nOwner: h4444433333\n\nSummary: Skill Graph for Analogical Reasoning. Build a graph over SKILL.md skills, choose one primary skill, and retrieve complementary support instead of naively att...\n\nTags: latest:1.0.4\n\nVersion history:\n\nv1.0.4 | 2026-05-28T02:47:02.457Z | user\n\n- Added _meta.json for enhanced metadata support.\n- Improved guidance for handling supporting skills: only use a supporting skill if it provides clear, non-conflicting value for the current task.\n- Clarified instructions in \"How to interpret results\" for better adoption of skill roles.\n\nv1.0.3 | 2026-05-11T05:35:12.792Z | user\n\nNo changes detected in this version.\n\n- Version 1.0.3 is functionally identical to the previous release. No modifications were made to any files.\n\nv1.0.2 | 2026-05-11T05:27:45.846Z | user\n\n- No file changes detected in this version.\n- Functionality and documentation remain the same as the previous release.\n\nv1.0.1 | 2026-05-11T04:18:55.986Z | user\n\n- Improved accuracy and clarity in how the code is called: primary execution now always uses the included helper script before external binaries.\n- Expanded guidance for runtime: provided more detail on fallback behaviors and how to use the CLI, Python package, or direct users to GitHub if needed.\n- Updated documentation to clarify analogical reasoning goals and benefits, including improved descriptions of result interpretation and system differentiation.\n- Added \"GitHub version\" instructions for both OpenClaw skill installation and direct Python package usage.\n\nv1.0.0 | 2026-05-11T01:39:33.527Z | user\n\nSkill Graph for Analogical Reasoning — first release.\n\n- Enables building, querying, and visualizing a skill graph for analogical reasoning across SKILL.md folders.\n- Differentiates primary skills, supporting skills, and fallback options to improve retrieval beyond simple similarity.\n- Provides CLI-based commands: build, query, and look, with clear code execution rules and guidance.\n- Designed to plug into local Python3 environments, with instructions if dependencies are missing.\n- Full usage and interpretation details included in documentation.\n\nArchive index:\n\nArchive v1.0.4: 12 files, 24860 bytes\n\nFiles: _meta.json (155b), python-package/pyproject.toml (682b), python-package/README.md (6173b), python-package/src/auto_grap_skill/__init__.py (67b), python-package/src/auto_grap_skill/__main__.py (80b), python-package/src/auto_grap_skill/cli.py (26790b), python-package/src/auto_grap_skill/core.py (34949b), README.md (1512b), reference.md (1321b), scripts/run_grap_skill.py (1294b), skill-card.md (2185b), SKILL.md (4079b)\n\nFile v1.0.4:SKILL.md\n\n---\nname: grap-skill\ndescription: Skill Graph for Analogical Reasoning. Build a graph over SKILL.md skills, choose one primary skill, and retrieve complementary support instead of naively attaching top similar skills.\nuser-invocable: true\nmetadata: {\"openclaw\":{\"requires\":{\"bins\":[\"python3\"]}}}\n---\n\n# Skill Graph for Analogical Reasoning\n\nUse this skill when the user wants to work with a **graph skill** over local `SKILL.md` folders.\n\nThis skill is for:\n\n- graph-based skill indexing\n- analogical reasoning and transfer\n- one primary skill plus complementary support\n- avoiding naive \"top similar skills\" retrieval\n\nThe full Python package and CLI for this project are available in the GitHub repository.\n\n## What this skill does\n\nThis skill wraps the `grap-skill` capability.\n\nIt supports three primary commands:\n\n- `/grap-skill build`\n- `/grap-skill query`\n- `/grap-skill look`\n\n## Core rule\n\n- `build` is the only command that may scan skill folders and update the graph.\n- `query` and `look` are read-only against an existing `graph.json`.\n- Do not silently rebuild during `query`.\n\n## Code-backed usage\n\nThis skill is allowed to call code.\n\nThe `python3 {baseDir}/scripts/run_grap_skill.py ...` commands below are the\nstable execution entrypoints intended for the skill runtime and for model-driven\ntool use. They let the skill call a controlled wrapper inside the installed\nskill bundle instead of relying on ad hoc shell reconstruction.\n\nPreferred execution order:\n\n1. Use the helper script in `{baseDir}/scripts/run_grap_skill.py`.\n2. If the Python package is installed in the current interpreter, the wrapper may use `python -m auto_grap_skill`.\n3. If neither bundled code nor the local Python package is available, direct the user to the GitHub repository for this project and install the Python package first.\n\n## Primary commands\n\n### `/grap-skill build`\n\n```bash\npython3 {baseDir}/scripts/run_grap_skill.py build --source <skills_dir> --output <graph_dir>\n```\n\nExample:\n\n```bash\npython3 {baseDir}/scripts/run_grap_skill.py build --source ./skills-main --output ./.grap-skill\n```\n\n### `/grap-skill query`\n\n```bash\npython3 {baseDir}/scripts/run_grap_skill.py query \"<task text>\" --graph <graph_json_path>\n```\n\nExample:\n\n```bash\npython3 {baseDir}/scripts/run_grap_skill.py query \"edit a docx file with comments\" --graph ./.grap-skill/graph.json\n```\n\n### `/grap-skill look`\n\n```bash\npython3 {baseDir}/scripts/run_grap_skill.py look --graph <graph_json_path> --output <html_path>\n```\n\nExample:\n\n```bash\npython3 {baseDir}/scripts/run_grap_skill.py look --graph ./.grap-skill/graph.json --output ./.grap-skill/graph-look.html\n```\n\n## How to interpret results\n\n- `primary_skill` is the execution center.\n- Always treat `primary_skill` as the default lead. Use a `supporting_skill` only if it adds clear missing coverage and does not conflict with or dilute the primary skill. If a suggested supporting skill is not actually helpful for the current task, do not adopt it.\n- `supporting_skills` are the only skills that should normally supplement the primary skill in context.\n- `fallback_skills` are substitutes for failure paths.\n- `similar_skills` are for graph browsing, not default prompt context.\n\n## Why this is different\n\nMost retrieval systems stop at similarity.\nThis one tries to separate:\n\n- the skill that should lead execution\n- the skills that add complementary coverage\n- the skills that are merely nearby or redundant\n\nThat is the whole analogical-reasoning goal of this project.\n\n## More files in this skill\n\n- `README.md` — human-facing usage and install notes\n- `reference.md` — algorithm and result interpretation\n- `scripts/run_grap_skill.py` — helper wrapper that calls the actual Python package/CLI\n\n## GitHub version\n\nThe GitHub release of this project should also point users back to this skill\nbundle for skill-style installation:\n\n- ClawHub/OpenClaw install: `openclaw skills install skill-graph-for-analogical-reasoning`\n- GitHub/Python install: use the repository's Python package and local CLI when a full source checkout is preferred\n\nFile v1.0.4:python-package/README.md\n\n# Skill Graph for Analogical Reasoning\n\n[![License: Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](./LICENSE)\n\n`Skill Graph for Analogical Reasoning` is a graph-powered retrieval engine for AgentSkills-compatible `SKILL.md` folders.\n\n- pick one `primary_skill` as the execution center\n- retrieve a small set of `supporting_skills` that add complementary value\n- keep `similar_skills` separate from the default prompt context\n- use the graph to support transfer, analogy, and non-redundant composition\n\nThis project is built for graph skill retrieval, analogical reasoning, and\ncross-skill transfer over real skill folders.\n\n## Highlights\n\n- graph-based retrieval over `SKILL.md`\n- one `primary_skill` plus complementary support\n- not naive `top-k similar skills`\n- read-only query over a persisted `graph.json`\n- whole-graph HTML visualization with edge explanations\n- code-backed ClawHub/OpenClaw skill bundle\n\n## What You Get\n\n- multiple skills say almost the same thing\n- context gets wider but not smarter\n- execution focus becomes weaker\n- the model sees redundancy, not real analogy\n\n- `primary_skill` answers: which skill should lead?\n- `supporting_skills` answer: which skills fill what the primary skill does not cover?\n- `fallback_skills` answer: which nearby options are substitutes rather than companions?\n- `similar_skills` answer: what is graph-nearby, but should not be injected by default?\n\nThe graph is designed to separate leadership, support, fallback, and redundancy instead of collapsing everything into similarity.\n\n## Quick Start\n\n### Install\n\n```bash\npython3 -m venv .venv\n./.venv/bin/python -m pip install -e .\n```\n\n### Build A Graph\n\n```bash\n./.venv/bin/grap-skill build --source ./skills-main --output ./.grap-skill\n```\n\n### Query The Graph\n\n```bash\n./.venv/bin/grap-skill query \"edit a docx file with comments\" --graph ./.grap-skill/graph.json\n```\n\n### Render The Graph\n\n```bash\n./.venv/bin/grap-skill look --graph ./.grap-skill/graph.json --output ./.grap-skill/graph-look.html\n```\n\n## Core Commands\n\n### `build`\n\n`build` is the only command allowed to scan skill folders and update the graph.\n\nIt currently:\n\n- recursively scans `SKILL.md` and `skill.md`\n- parses frontmatter and markdown instructions\n- extracts descriptions, triggers, keywords, tool references, code references, and runtime constraints\n- constructs a weakly supervised graph from those signals\n- persists both a `similarity` view and a `complementarity` view into `graph.json`\n\n`query` and `look` are read-only over the saved graph and do not silently rebuild.\n\n### `query`\n\n`query` selects a structured result instead of dumping a similarity list.\n\nIt returns:\n\n- `primary_skill`\n- `supporting_skills`\n- `fallback_skills`\n- `similar_skills`\n\nThe important part is how `supporting_skills` are selected.\nThey are not chosen by raw similarity.\n\nThey are scored by a balance of:\n\n- `task_relevance`\n- `complementarity`\n- `execution_support`\n- `redundancy_with_primary`\n\nCurrent support scoring is:\n\n```text\nsupport_score =\n  0.30 * task_relevance\n  + 0.30 * complementarity\n  + 0.25 * execution_support\n  - 0.25 * redundancy_with_primary\n```\n\nThis is the mechanism that moves retrieval away from nearest-neighbor packing and toward main-skill-plus-support selection.\n\n### `look`\n\n`look` renders the current graph as a standalone HTML view.\n\nThe visualization currently supports:\n\n- full-graph browsing\n- `Similarity` and `Complementarity` view switching\n- edge color mapping from blue (`0`) to red (`1`)\n- click-edge explanations with natural-language summaries\n- evidence and score breakdowns for why an edge exists\n\n## Graph Signals\n\nAt build time, the graph tries to infer relationships from `SKILL.md` itself, including:\n\n- semantic description overlap\n- shared keywords and trigger language\n- tool and code affinity\n- runtime and constraint compatibility\n\nAt query time, high-similarity neighbors can still be excluded from `supporting_skills` if they do not add enough non-redundant value.\n\n## Example Output Shape\n\n```json\n{\n  \"primary_skill\": \"...\",\n  \"supporting_skills\": [\"...\"],\n  \"fallback_skills\": [\"...\"],\n  \"similar_skills\": [\"...\"]\n}\n```\n\nResult interpretation:\n\n- `primary_skill` is the execution center\n- `supporting_skills` are the only skills that should usually supplement context\n- `fallback_skills` are substitutes for failure paths\n- `similar_skills` are for browsing and inspection, not default prompt packing\n\n## Current Status\n\nThis repository is already usable as an early MVP.\n\nWorking now:\n\n- graph build over `SKILL.md` folders\n- read-only query over persisted `graph.json`\n- primary-skill selection\n- complementary support selection\n- whole-graph HTML visualization\n- edge explanations with evidence\n\nStill early by design:\n\n- stronger relations such as prerequisite and composition are not inferred yet\n- graph quality is still bounded by what can be extracted from `SKILL.md`\n- there is no trace-driven self-improvement loop yet\n\n## Repository Layout\n\n- `src/auto_grap_skill/` contains the Python package and CLI\n- `skills/grap-skill/` contains the local skill wrapper\n- `releases/github/` contains a visible GitHub-facing source snapshot\n- `releases/clawhub-skill/` contains the final ClawHub upload bundle\n- `releases/gist/` contains the long-form public markdown version\n\n## Python Package And CLI\n\nThe installable package name is:\n\n- `skill-graph-for-analogical-reasoning`\n\nThe local CLI command is:\n\n- `grap-skill`\n\nThe module entrypoint also works:\n\n```bash\n./.venv/bin/python -m auto_grap_skill --help\n```\n\n## ClawHub Version\n\nA code-backed ClawHub skill bundle is prepared in:\n\n- `releases/clawhub-skill/skill-graph-for-analogical-reasoning`\n\nThat bundle is not markdown-only.\nIt includes:\n\n- `SKILL.md`\n- supporting documentation\n- `scripts/run_grap_skill.py`\n- `python-package/src/auto_grap_skill/`\n\nThe ClawHub bundle now carries both the wrapper entrypoint and the packaged Python source used by the project.\n\n## Why The Name\n\n`Skill Graph for Analogical Reasoning` is intentionally explicit.\n\nIt says what the project actually is:\n\n- a skill graph\n- for analogical reasoning\n- over real `SKILL.md` skills\n\nFile v1.0.4:README.md\n\n# Skill Graph for Analogical Reasoning\n\nThis is the ClawHub/OpenClaw skill bundle for the `Skill Graph for Analogical Reasoning` project.\n\nIt exposes the `grap-skill` capability as a skill-oriented interface around three main commands:\n\n- `/grap-skill build`\n- `/grap-skill query`\n- `/grap-skill look`\n\n## What this version is\n\nThis skill version is for users who want to use the graph capability through a skill workflow.\n\nThe full source code, Python package, and CLI live in the GitHub repository for this project.\n\n## What this skill can do\n\n- build a graph over local `SKILL.md` folders\n- select one primary skill for a task\n- retrieve complementary support instead of simply taking the top similar skills\n- render the skill network as a visual graph\n\n## Skill usage\n\n- Use `/grap-skill build` to scan local skill folders and create a `graph.json`\n- Use `/grap-skill query` to select one primary skill plus complementary support from an existing graph\n- Use `/grap-skill look` to render the current graph as an HTML visualization\n\n## Cross discovery\n\nThe GitHub repository is the main development version and the official Python\npackage source.\n\nUse the GitHub version when you want:\n\n- a full source checkout\n- editable installs\n- direct Python package development\n\nUse this ClawHub/OpenClaw skill version when you want:\n\n- `openclaw skills install skill-graph-for-analogical-reasoning`\n- a skill-style wrapper around the packaged graph commands\n- a bundle that can be installed into an OpenClaw workspace\n\nFile v1.0.4:_meta.json\n\n{\n  \"ownerId\": \"kn76ts9v9tgsgadm8pww346n6h836dvn\",\n  \"slug\": \"skill-graph-for-analogical-reasoning\",\n  \"version\": \"1.0.4\",\n  \"publishedAt\": 1779936422457\n}\n\nFile v1.0.4:reference.md\n\n# Reference\n\n## Project idea\n\nSkill Graph for Analogical Reasoning builds a graph over `SKILL.md`-based skills and tries to retrieve skills the way a careful human would:\n\n- one primary skill\n- a few complementary supporting skills\n- no naive pile of near-duplicate instructions\n\n## Build algorithm\n\n`build` extracts from each skill:\n\n- description\n- trigger phrases\n- keywords\n- tool/code references\n- runtime constraints\n\nThen it computes weakly supervised relations between skill pairs.\n\nStored views include:\n\n- `similarity` — static closeness between skills\n- `complementarity` — a proxy for \"useful together without being redundant\"\n\n## Query algorithm\n\n### Step 1: choose one primary skill\n\nPrimary-skill ranking uses signals such as:\n\n- intent match\n- trigger match\n- object match\n- readiness\n- specificity\n- lexical match\n\n### Step 2: choose complementary support\n\nSupporting-skill ranking uses:\n\n- `task_relevance`\n- `complementarity`\n- `execution_support`\n- `redundancy_with_primary` penalty\n\nThe goal is **not** to attach several highly similar skills.\nThe goal is to attach only the skills that actually add missing coverage.\n\n## Look view\n\n`look` renders the graph and lets the user switch between:\n\n- `Similarity`\n- `Complementarity`\n\nEdges are colored from blue (`0`) to red (`1`) in the active view.\n\nFile v1.0.4:skill-card.md\n\n## Description:\n\nSkill Graph for Analogical Reasoning builds a graph over local SKILL.md folders to choose one primary skill and retrieve complementary support instead of naive top-similar matches.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[h4444433333](https://clawhub.ai/user/h4444433333)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and agent-workflow maintainers use this skill to build and query a graph of local SKILL.md folders, select a primary skill for a task, and inspect complementary or fallback skills before adding context.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The launcher can fall back to running a local grap-skill executable discovered from PATH.\n\nMitigation: Use the bundled helper or a trusted installed module in a controlled environment, and avoid untrusted PATH entries until the launcher uses only a trusted absolute entrypoint.\n\nRisk: Generated graph.json files can contain local paths and excerpts from indexed skill files.\n\nMitigation: Run the build command only on skill directories intended for indexing, and review graph artifacts before sharing them outside the workspace.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/h4444433333/skills/skill-graph-for-analogical-reasoning)\n- [README](README.md)\n- [Reference](reference.md)\n- [Python package README](python-package/README.md)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Shell commands, Configuration, Code, Files]\n\n**Output Format:** [Markdown guidance with shell commands; CLI commands can produce JSON graph data and HTML visualization files.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Requires python3. The build command scans selected skill directories and can write graph.json; the look command can write an HTML visualization.]\n\n## Skill Version(s):\n\n1.0.4 (source: server release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.4:python-package/pyproject.toml\n\n[build-system]\nrequires = [\"setuptools>=68\", \"wheel\"]\nbuild-backend = \"setuptools.build_meta\"\n\n[project]\nname = \"skill-graph-for-analogical-reasoning\"\nversion = \"0.1.0\"\ndescription = \"Skill Graph for Analogical Reasoning: graph-powered retrieval over AgentSkills-compatible SKILL.md folders.\"\nlicense = \"Apache-2.0\"\nauthors = [\n  { name = \"huangzhizheng\" },\n]\nkeywords = [\"skills\", \"graph\", \"analogical-reasoning\", \"agent-skills\", \"retrieval\"]\nreadme = \"README.md\"\nrequires-python = \">=3.11\"\ndependencies = [\n  \"PyYAML>=6.0\",\n]\n\n[project.scripts]\ngrap-skill = \"auto_grap_skill.cli:main\"\n\n[tool.setuptools]\npackage-dir = {\"\" = \"src\"}\n\n[tool.setuptools.packages.find]\nwhere = [\"src\"]\n\nArchive v1.0.3: 12 files, 24775 bytes\n\nFiles: python-package/pyproject.toml (682b), python-package/README.md (6173b), python-package/src/auto_grap_skill/__init__.py (67b), python-package/src/auto_grap_skill/__main__.py (80b), python-package/src/auto_grap_skill/cli.py (26790b), python-package/src/auto_grap_skill/core.py (34949b), README.md (1512b), reference.md (1321b), scripts/run_grap_skill.py (1294b), skill-card.md (2335b), SKILL.md (3812b), _meta.json (155b)\n\nFile v1.0.3:SKILL.md\n\n---\nname: grap-skill\ndescription: Skill Graph for Analogical Reasoning. Build a graph over SKILL.md skills, choose one primary skill, and retrieve complementary support instead of naively attaching top similar skills.\nuser-invocable: true\nmetadata: {\"openclaw\":{\"requires\":{\"bins\":[\"python3\"]}}}\n---\n\n# Skill Graph for Analogical Reasoning\n\nUse this skill when the user wants to work with a **graph skill** over local `SKILL.md` folders.\n\nThis skill is for:\n\n- graph-based skill indexing\n- analogical reasoning and transfer\n- one primary skill plus complementary support\n- avoiding naive \"top similar skills\" retrieval\n\nThe full Python package and CLI for this project are available in the GitHub repository.\n\n## What this skill does\n\nThis skill wraps the `grap-skill` capability.\n\nIt supports three primary commands:\n\n- `/grap-skill build`\n- `/grap-skill query`\n- `/grap-skill look`\n\n## Core rule\n\n- `build` is the only command that may scan skill folders and update the graph.\n- `query` and `look` are read-only against an existing `graph.json`.\n- Do not silently rebuild during `query`.\n\n## Code-backed usage\n\nThis skill is allowed to call code.\n\nThe `python3 {baseDir}/scripts/run_grap_skill.py ...` commands below are the\nstable execution entrypoints intended for the skill runtime and for model-driven\ntool use. They let the skill call a controlled wrapper inside the installed\nskill bundle instead of relying on ad hoc shell reconstruction.\n\nPreferred execution order:\n\n1. Use the helper script in `{baseDir}/scripts/run_grap_skill.py`.\n2. If the Python package is installed in the current interpreter, the wrapper may use `python -m auto_grap_skill`.\n3. If neither bundled code nor the local Python package is available, direct the user to the GitHub repository for this project and install the Python package first.\n\n## Primary commands\n\n### `/grap-skill build`\n\n```bash\npython3 {baseDir}/scripts/run_grap_skill.py build --source <skills_dir> --output <graph_dir>\n```\n\nExample:\n\n```bash\npython3 {baseDir}/scripts/run_grap_skill.py build --source ./skills-main --output ./.grap-skill\n```\n\n### `/grap-skill query`\n\n```bash\npython3 {baseDir}/scripts/run_grap_skill.py query \"<task text>\" --graph <graph_json_path>\n```\n\nExample:\n\n```bash\npython3 {baseDir}/scripts/run_grap_skill.py query \"edit a docx file with comments\" --graph ./.grap-skill/graph.json\n```\n\n### `/grap-skill look`\n\n```bash\npython3 {baseDir}/scripts/run_grap_skill.py look --graph <graph_json_path> --output <html_path>\n```\n\nExample:\n\n```bash\npython3 {baseDir}/scripts/run_grap_skill.py look --graph ./.grap-skill/graph.json --output ./.grap-skill/graph-look.html\n```\n\n## How to interpret results\n\n- `primary_skill` is the execution center.\n- `supporting_skills` are the only skills that should normally supplement the primary skill in context.\n- `fallback_skills` are substitutes for failure paths.\n- `similar_skills` are for graph browsing, not default prompt context.\n\n## Why this is different\n\nMost retrieval systems stop at similarity.\nThis one tries to separate:\n\n- the skill that should lead execution\n- the skills that add complementary coverage\n- the skills that are merely nearby or redundant\n\nThat is the whole analogical-reasoning goal of this project.\n\n## More files in this skill\n\n- `README.md` — human-facing usage and install notes\n- `reference.md` — algorithm and result interpretation\n- `scripts/run_grap_skill.py` — helper wrapper that calls the actual Python package/CLI\n\n## GitHub version\n\nThe GitHub release of this project should also point users back to this skill\nbundle for skill-style installation:\n\n- ClawHub/OpenClaw install: `openclaw skills install skill-graph-for-analogical-reasoning`\n- GitHub/Python install: use the repository's Python package and local CLI when a full source checkout is preferred\n\nFile v1.0.3:python-package/README.md\n\n# Skill Graph for Analogical Reasoning\n\n[![License: Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](./LICENSE)\n\n`Skill Graph for Analogical Reasoning` is a graph-powered retrieval engine for AgentSkills-compatible `SKILL.md` folders.\n\n- pick one `primary_skill` as the execution center\n- retrieve a small set of `supporting_skills` that add complementary value\n- keep `similar_skills` separate from the default prompt context\n- use the graph to support transfer, analogy, and non-redundant composition\n\nThis project is built for graph skill retrieval, analogical reasoning, and\ncross-skill transfer over real skill folders.\n\n## Highlights\n\n- graph-based retrieval over `SKILL.md`\n- one `primary_skill` plus complementary support\n- not naive `top-k similar skills`\n- read-only query over a persisted `graph.json`\n- whole-graph HTML visualization with edge explanations\n- code-backed ClawHub/OpenClaw skill bundle\n\n## What You Get\n\n- multiple skills say almost the same thing\n- context gets wider but not smarter\n- execution focus becomes weaker\n- the model sees redundancy, not real analogy\n\n- `primary_skill` answers: which skill should lead?\n- `supporting_skills` answer: which skills fill what the primary skill does not cover?\n- `fallback_skills` answer: which nearby options are substitutes rather than companions?\n- `similar_skills` answer: what is graph-nearby, but should not be injected by default?\n\nThe graph is designed to separate leadership, support, fallback, and redundancy instead of collapsing everything into similarity.\n\n## Quick Start\n\n### Install\n\n```bash\npython3 -m venv .venv\n./.venv/bin/python -m pip install -e .\n```\n\n### Build A Graph\n\n```bash\n./.venv/bin/grap-skill build --source ./skills-main --output ./.grap-skill\n```\n\n### Query The Graph\n\n```bash\n./.venv/bin/grap-skill query \"edit a docx file with comments\" --graph ./.grap-skill/graph.json\n```\n\n### Render The Graph\n\n```bash\n./.venv/bin/grap-skill look --graph ./.grap-skill/graph.json --output ./.grap-skill/graph-look.html\n```\n\n## Core Commands\n\n### `build`\n\n`build` is the only command allowed to scan skill folders and update the graph.\n\nIt currently:\n\n- recursively scans `SKILL.md` and `skill.md`\n- parses frontmatter and markdown instructions\n- extracts descriptions, triggers, keywords, tool references, code references, and runtime constraints\n- constructs a weakly supervised graph from those signals\n- persists both a `similarity` view and a `complementarity` view into `graph.json`\n\n`query` and `look` are read-only over the saved graph and do not silently rebuild.\n\n### `query`\n\n`query` selects a structured result instead of dumping a similarity list.\n\nIt returns:\n\n- `primary_skill`\n- `supporting_skills`\n- `fallback_skills`\n- `similar_skills`\n\nThe important part is how `supporting_skills` are selected.\nThey are not chosen by raw similarity.\n\nThey are scored by a balance of:\n\n- `task_relevance`\n- `complementarity`\n- `execution_support`\n- `redundancy_with_primary`\n\nCurrent support scoring is:\n\n```text\nsupport_score =\n  0.30 * task_relevance\n  + 0.30 * complementarity\n  + 0.25 * execution_support\n  - 0.25 * redundancy_with_primary\n```\n\nThis is the mechanism that moves retrieval away from nearest-neighbor packing and toward main-skill-plus-support selection.\n\n### `look`\n\n`look` renders the current graph as a standalone HTML view.\n\nThe visualization currently supports:\n\n- full-graph browsing\n- `Similarity` and `Complementarity` view switching\n- edge color mapping from blue (`0`) to red (`1`)\n- click-edge explanations with natural-language summaries\n- evidence and score breakdowns for why an edge exists\n\n## Graph Signals\n\nAt build time, the graph tries to infer relationships from `SKILL.md` itself, including:\n\n- semantic description overlap\n- shared keywords and trigger language\n- tool and code affinity\n- runtime and constraint compatibility\n\nAt query time, high-similarity neighbors can still be excluded from `supporting_skills` if they do not add enough non-redundant value.\n\n## Example Output Shape\n\n```json\n{\n  \"primary_skill\": \"...\",\n  \"supporting_skills\": [\"...\"],\n  \"fallback_skills\": [\"...\"],\n  \"similar_skills\": [\"...\"]\n}\n```\n\nResult interpretation:\n\n- `primary_skill` is the execution center\n- `supporting_skills` are the only skills that should usually supplement context\n- `fallback_skills` are substitutes for failure paths\n- `similar_skills` are for browsing and inspection, not default prompt packing\n\n## Current Status\n\nThis repository is already usable as an early MVP.\n\nWorking now:\n\n- graph build over `SKILL.md` folders\n- read-only query over persisted `graph.json`\n- primary-skill selection\n- complementary support selection\n- whole-graph HTML visualization\n- edge explanations with evidence\n\nStill early by design:\n\n- stronger relations such as prerequisite and composition are not inferred yet\n- graph quality is still bounded by what can be extracted from `SKILL.md`\n- there is no trace-driven self-improvement loop yet\n\n## Repository Layout\n\n- `src/auto_grap_skill/` contains the Python package and CLI\n- `skills/grap-skill/` contains the local skill wrapper\n- `releases/github/` contains a visible GitHub-facing source snapshot\n- `releases/clawhub-skill/` contains the final ClawHub upload bundle\n- `releases/gist/` contains the long-form public markdown version\n\n## Python Package And CLI\n\nThe installable package name is:\n\n- `skill-graph-for-analogical-reasoning`\n\nThe local CLI command is:\n\n- `grap-skill`\n\nThe module entrypoint also works:\n\n```bash\n./.venv/bin/python -m auto_grap_skill --help\n```\n\n## ClawHub Version\n\nA code-backed ClawHub skill bundle is prepared in:\n\n- `releases/clawhub-skill/skill-graph-for-analogical-reasoning`\n\nThat bundle is not markdown-only.\nIt includes:\n\n- `SKILL.md`\n- supporting documentation\n- `scripts/run_grap_skill.py`\n- `python-package/src/auto_grap_skill/`\n\nThe ClawHub bundle now carries both the wrapper entrypoint and the packaged Python source used by the project.\n\n## Why The Name\n\n`Skill Graph for Analogical Reasoning` is intentionally explicit.\n\nIt says what the project actually is:\n\n- a skill graph\n- for analogical reasoning\n- over real `SKILL.md` skills\n\nFile v1.0.3:README.md\n\n# Skill Graph for Analogical Reasoning\n\nThis is the ClawHub/OpenClaw skill bundle for the `Skill Graph for Analogical Reasoning` project.\n\nIt exposes the `grap-skill` capability as a skill-oriented interface around three main commands:\n\n- `/grap-skill build`\n- `/grap-skill query`\n- `/grap-skill look`\n\n## What this version is\n\nThis skill version is for users who want to use the graph capability through a skill workflow.\n\nThe full source code, Python package, and CLI live in the GitHub repository for this project.\n\n## What this skill can do\n\n- build a graph over local `SKILL.md` folders\n- select one primary skill for a task\n- retrieve complementary support instead of simply taking the top similar skills\n- render the skill network as a visual graph\n\n## Skill usage\n\n- Use `/grap-skill build` to scan local skill folders and create a `graph.json`\n- Use `/grap-skill query` to select one primary skill plus complementary support from an existing graph\n- Use `/grap-skill look` to render the current graph as an HTML visualization\n\n## Cross discovery\n\nThe GitHub repository is the main development version and the official Python\npackage source.\n\nUse the GitHub version when you want:\n\n- a full source checkout\n- editable installs\n- direct Python package development\n\nUse this ClawHub/OpenClaw skill version when you want:\n\n- `openclaw skills install skill-graph-for-analogical-reasoning`\n- a skill-style wrapper around the packaged graph commands\n- a bundle that can be installed into an OpenClaw workspace\n\nFile v1.0.3:_meta.json\n\n{\n  \"ownerId\": \"kn76ts9v9tgsgadm8pww346n6h836dvn\",\n  \"slug\": \"skill-graph-for-analogical-reasoning\",\n  \"version\": \"1.0.3\",\n  \"publishedAt\": 1778477712792\n}\n\nFile v1.0.3:reference.md\n\n# Reference\n\n## Project idea\n\nSkill Graph for Analogical Reasoning builds a graph over `SKILL.md`-based skills and tries to retrieve skills the way a careful human would:\n\n- one primary skill\n- a few complementary supporting skills\n- no naive pile of near-duplicate instructions\n\n## Build algorithm\n\n`build` extracts from each skill:\n\n- description\n- trigger phrases\n- keywords\n- tool/code references\n- runtime constraints\n\nThen it computes weakly supervised relations between skill pairs.\n\nStored views include:\n\n- `similarity` — static closeness between skills\n- `complementarity` — a proxy for \"useful together without being redundant\"\n\n## Query algorithm\n\n### Step 1: choose one primary skill\n\nPrimary-skill ranking uses signals such as:\n\n- intent match\n- trigger match\n- object match\n- readiness\n- specificity\n- lexical match\n\n### Step 2: choose complementary support\n\nSupporting-skill ranking uses:\n\n- `task_relevance`\n- `complementarity`\n- `execution_support`\n- `redundancy_with_primary` penalty\n\nThe goal is **not** to attach several highly similar skills.\nThe goal is to attach only the skills that actually add missing coverage.\n\n## Look view\n\n`look` renders the graph and lets the user switch between:\n\n- `Similarity`\n- `Complementarity`\n\nEdges are colored from blue (`0`) to red (`1`) in the active view.\n\nFile v1.0.3:skill-card.md\n\n## Description: <br>\nSkill Graph for Analogical Reasoning builds a graph over SKILL.md skills, chooses one primary skill, and retrieves complementary support instead of naively attaching top similar skills. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[h4444433333](https://clawhub.ai/user/h4444433333) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nDevelopers and engineers use this skill to index local SKILL.md folders, select a primary skill for a task, and identify complementary supporting skills without packing redundant nearest-neighbor results into context. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Generated graph.json or HTML views can reveal local skill names, paths, descriptions, and runtime requirement names. <br>\nMitigation: Build graphs only from trusted, intended skill directories and review generated graph or HTML files before sharing them. <br>\nRisk: The build command runs a local Python helper over user-selected skill folders. <br>\nMitigation: Run it only in workspaces where local Python execution is acceptable and avoid pointing it at broad private directories unnecessarily. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/h4444433333/skill-graph-for-analogical-reasoning) <br>\n- [Skill bundle README](artifact/README.md) <br>\n- [Algorithm reference](artifact/reference.md) <br>\n- [Python package README](artifact/python-package/README.md) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, shell commands, code, configuration, guidance] <br>\n**Output Format:** [Markdown guidance with bash commands; CLI results may include JSON graph data and standalone HTML visualization files.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Requires python3. The build command scans selected skill folders and writes graph.json; query and look read an existing graph.] <br>\n\n## Skill Version(s): <br>\n1.0.3 (source: ClawHub release metadata) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.0.3:python-package/pyproject.toml\n\n[build-system]\nrequires = [\"setuptools>=68\", \"wheel\"]\nbuild-backend = \"setuptools.build_meta\"\n\n[project]\nname = \"skill-graph-for-analogical-reasoning\"\nversion = \"0.1.0\"\ndescription = \"Skill Graph for Analogical Reasoning: graph-powered retrieval over AgentSkills-compatible SKILL.md folders.\"\nlicense = \"Apache-2.0\"\nauthors = [\n  { name = \"huangzhizheng\" },\n]\nkeywords = [\"skills\", \"graph\", \"analogical-reasoning\", \"agent-skills\", \"retrieval\"]\nreadme = \"README.md\"\nrequires-python = \">=3.11\"\ndependencies = [\n  \"PyYAML>=6.0\",\n]\n\n[project.scripts]\ngrap-skill = \"auto_grap_skill.cli:main\"\n\n[tool.setuptools]\npackage-dir = {\"\" = \"src\"}\n\n[tool.setuptools.packages.find]\nwhere = [\"src\"]\n\nArchive v1.0.2: 11 files, 23747 bytes\n\nFiles: python-package/pyproject.toml (682b), python-package/README.md (6173b), python-package/src/auto_grap_skill/__init__.py (67b), python-package/src/auto_grap_skill/__main__.py (80b), python-package/src/auto_grap_skill/cli.py (26790b), python-package/src/auto_grap_skill/core.py (34949b), README.md (2067b), reference.md (1321b), scripts/run_grap_skill.py (1294b), SKILL.md (3812b), _meta.json (155b)\n\nFile v1.0.2:SKILL.md\n\n---\nname: grap-skill\ndescription: Skill Graph for Analogical Reasoning. Build a graph over SKILL.md skills, choose one primary skill, and retrieve complementary support instead of naively attaching top similar skills.\nuser-invocable: true\nmetadata: {\"openclaw\":{\"requires\":{\"bins\":[\"python3\"]}}}\n---\n\n# Skill Graph for Analogical Reasoning\n\nUse this skill when the user wants to work with a **graph skill** over local `SKILL.md` folders.\n\nThis skill is for:\n\n- graph-based skill indexing\n- analogical reasoning and transfer\n- one primary skill plus complementary support\n- avoiding naive \"top similar skills\" retrieval\n\nThe full Python package and CLI for this project are available in the GitHub repository.\n\n## What this skill does\n\nThis skill wraps the `grap-skill` capability.\n\nIt supports three primary commands:\n\n- `/grap-skill build`\n- `/grap-skill query`\n- `/grap-skill look`\n\n## Core rule\n\n- `build` is the only command that may scan skill folders and update the graph.\n- `query` and `look` are read-only against an existing `graph.json`.\n- Do not silently rebuild during `query`.\n\n## Code-backed usage\n\nThis skill is allowed to call code.\n\nThe `python3 {baseDir}/scripts/run_grap_skill.py ...` commands below are the\nstable execution entrypoints intended for the skill runtime and for model-driven\ntool use. They let the skill call a controlled wrapper inside the installed\nskill bundle instead of relying on ad hoc shell reconstruction.\n\nPreferred execution order:\n\n1. Use the helper script in `{baseDir}/scripts/run_grap_skill.py`.\n2. If the Python package is installed in the current interpreter, the wrapper may use `python -m auto_grap_skill`.\n3. If neither bundled code nor the local Python package is available, direct the user to the GitHub repository for this project and install the Python package first.\n\n## Primary commands\n\n### `/grap-skill build`\n\n```bash\npython3 {baseDir}/scripts/run_grap_skill.py build --source <skills_dir> --output <graph_dir>\n```\n\nExample:\n\n```bash\npython3 {baseDir}/scripts/run_grap_skill.py build --source ./skills-main --output ./.grap-skill\n```\n\n### `/grap-skill query`\n\n```bash\npython3 {baseDir}/scripts/run_grap_skill.py query \"<task text>\" --graph <graph_json_path>\n```\n\nExample:\n\n```bash\npython3 {baseDir}/scripts/run_grap_skill.py query \"edit a docx file with comments\" --graph ./.grap-skill/graph.json\n```\n\n### `/grap-skill look`\n\n```bash\npython3 {baseDir}/scripts/run_grap_skill.py look --graph <graph_json_path> --output <html_path>\n```\n\nExample:\n\n```bash\npython3 {baseDir}/scripts/run_grap_skill.py look --graph ./.grap-skill/graph.json --output ./.grap-skill/graph-look.html\n```\n\n## How to interpret results\n\n- `primary_skill` is the execution center.\n- `supporting_skills` are the only skills that should normally supplement the primary skill in context.\n- `fallback_skills` are substitutes for failure paths.\n- `similar_skills` are for graph browsing, not default prompt context.\n\n## Why this is different\n\nMost retrieval systems stop at similarity.\nThis one tries to separate:\n\n- the skill that should lead execution\n- the skills that add complementary coverage\n- the skills that are merely nearby or redundant\n\nThat is the whole analogical-reasoning goal of this project.\n\n## More files in this skill\n\n- `README.md` — human-facing usage and install notes\n- `reference.md` — algorithm and result interpretation\n- `scripts/run_grap_skill.py` — helper wrapper that calls the actual Python package/CLI\n\n## GitHub version\n\nThe GitHub release of this project should also point users back to this skill\nbundle for skill-style installation:\n\n- ClawHub/OpenClaw install: `openclaw skills install skill-graph-for-analogical-reasoning`\n- GitHub/Python install: use the repository's Python package and local CLI when a full source checkout is preferred\n\nFile v1.0.2:python-package/README.md\n\n# Skill Graph for Analogical Reasoning\n\n[![License: Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](./LICENSE)\n\n`Skill Graph for Analogical Reasoning` is a graph-powered retrieval engine for AgentSkills-compatible `SKILL.md` folders.\n\n- pick one `primary_skill` as the execution center\n- retrieve a small set of `supporting_skills` that add complementary value\n- keep `similar_skills` separate from the default prompt context\n- use the graph to support transfer, analogy, and non-redundant composition\n\nThis project is built for graph skill retrieval, analogical reasoning, and\ncross-skill transfer over real skill folders.\n\n## Highlights\n\n- graph-based retrieval over `SKILL.md`\n- one `primary_skill` plus complementary support\n- not naive `top-k similar skills`\n- read-only query over a persisted `graph.json`\n- whole-graph HTML visualization with edge explanations\n- code-backed ClawHub/OpenClaw skill bundle\n\n## What You Get\n\n- multiple skills say almost the same thing\n- context gets wider but not smarter\n- execution focus becomes weaker\n- the model sees redundancy, not real analogy\n\n- `primary_skill` answers: which skill should lead?\n- `supporting_skills` answer: which skills fill what the primary skill does not cover?\n- `fallback_skills` answer: which nearby options are substitutes rather than companions?\n- `similar_skills` answer: what is graph-nearby, but should not be injected by default?\n\nThe graph is designed to separate leadership, support, fallback, and redundancy instead of collapsing everything into similarity.\n\n## Quick Start\n\n### Install\n\n```bash\npython3 -m venv .venv\n./.venv/bin/python -m pip install -e .\n```\n\n### Build A Graph\n\n```bash\n./.venv/bin/grap-skill build --source ./skills-main --output ./.grap-skill\n```\n\n### Query The Graph\n\n```bash\n./.venv/bin/grap-skill query \"edit a docx file with comments\" --graph ./.grap-skill/graph.json\n```\n\n### Render The Graph\n\n```bash\n./.venv/bin/grap-skill look --graph ./.grap-skill/graph.json --output ./.grap-skill/graph-look.html\n```\n\n## Core Commands\n\n### `build`\n\n`build` is the only command allowed to scan skill folders and update the graph.\n\nIt currently:\n\n- recursively scans `SKILL.md` and `skill.md`\n- parses frontmatter and markdown instructions\n- extracts descriptions, triggers, keywords, tool references, code references, and runtime constraints\n- constructs a weakly supervised graph from those signals\n- persists both a `similarity` view and a `complementarity` view into `graph.json`\n\n`query` and `look` are read-only over the saved graph and do not silently rebuild.\n\n### `query`\n\n`query` selects a structured result instead of dumping a similarity list.\n\nIt returns:\n\n- `primary_skill`\n- `supporting_skills`\n- `fallback_skills`\n- `similar_skills`\n\nThe important part is how `supporting_skills` are selected.\nThey are not chosen by raw similarity.\n\nThey are scored by a balance of:\n\n- `task_relevance`\n- `complementarity`\n- `execution_support`\n- `redundancy_with_primary`\n\nCurrent support scoring is:\n\n```text\nsupport_score =\n  0.30 * task_relevance\n  + 0.30 * complementarity\n  + 0.25 * execution_support\n  - 0.25 * redundancy_with_primary\n```\n\nThis is the mechanism that moves retrieval away from nearest-neighbor packing and toward main-skill-plus-support selection.\n\n### `look`\n\n`look` renders the current graph as a standalone HTML view.\n\nThe visualization currently supports:\n\n- full-graph browsing\n- `Similarity` and `Complementarity` view switching\n- edge color mapping from blue (`0`) to red (`1`)\n- click-edge explanations with natural-language summaries\n- evidence and score breakdowns for why an edge exists\n\n## Graph Signals\n\nAt build time, the graph tries to infer relationships from `SKILL.md` itself, including:\n\n- semantic description overlap\n- shared keywords and trigger language\n- tool and code affinity\n- runtime and constraint compatibility\n\nAt query time, high-similarity neighbors can still be excluded from `supporting_skills` if they do not add enough non-redundant value.\n\n## Example Output Shape\n\n```json\n{\n  \"primary_skill\": \"...\",\n  \"supporting_skills\": [\"...\"],\n  \"fallback_skills\": [\"...\"],\n  \"similar_skills\": [\"...\"]\n}\n```\n\nResult interpretation:\n\n- `primary_skill` is the execution center\n- `supporting_skills` are the only skills that should usually supplement context\n- `fallback_skills` are substitutes for failure paths\n- `similar_skills` are for browsing and inspection, not default prompt packing\n\n## Current Status\n\nThis repository is already usable as an early MVP.\n\nWorking now:\n\n- graph build over `SKILL.md` folders\n- read-only query over persisted `graph.json`\n- primary-skill selection\n- complementary support selection\n- whole-graph HTML visualization\n- edge explanations with evidence\n\nStill early by design:\n\n- stronger relations such as prerequisite and composition are not inferred yet\n- graph quality is still bounded by what can be extracted from `SKILL.md`\n- there is no trace-driven self-improvement loop yet\n\n## Repository Layout\n\n- `src/auto_grap_skill/` contains the Python package and CLI\n- `skills/grap-skill/` contains the local skill wrapper\n- `releases/github/` contains a visible GitHub-facing source snapshot\n- `releases/clawhub-skill/` contains the final ClawHub upload bundle\n- `releases/gist/` contains the long-form public markdown version\n\n## Python Package And CLI\n\nThe installable package name is:\n\n- `skill-graph-for-analogical-reasoning`\n\nThe local CLI command is:\n\n- `grap-skill`\n\nThe module entrypoint also works:\n\n```bash\n./.venv/bin/python -m auto_grap_skill --help\n```\n\n## ClawHub Version\n\nA code-backed ClawHub skill bundle is prepared in:\n\n- `releases/clawhub-skill/skill-graph-for-analogical-reasoning`\n\nThat bundle is not markdown-only.\nIt includes:\n\n- `SKILL.md`\n- supporting documentation\n- `scripts/run_grap_skill.py`\n- `python-package/src/auto_grap_skill/`\n\nThe ClawHub bundle now carries both the wrapper entrypoint and the packaged Python source used by the project.\n\n## Why The Name\n\n`Skill Graph for Analogical Reasoning` is intentionally explicit.\n\nIt says what the project actually is:\n\n- a skill graph\n- for analogical reasoning\n- over real `SKILL.md` skills\n\nFile v1.0.2:README.md\n\n# Skill Graph for Analogical Reasoning\n\nThis is the ClawHub/OpenClaw skill bundle for the `Skill Graph for Analogical Reasoning` project.\n\nIt exposes the `grap-skill` capability as a skill-oriented interface around three main commands:\n\n- `/grap-skill build`\n- `/grap-skill query`\n- `/grap-skill look`\n\n## What this version is\n\nThis skill version is for users who want to use the graph capability through a skill workflow.\n\nThe full source code, Python package, and CLI live in the GitHub repository for this project.\n\n## What this skill can do\n\n- build a graph over local `SKILL.md` folders\n- select one primary skill for a task\n- retrieve complementary support instead of simply taking the top similar skills\n- render the skill network as a visual graph\n\n## How code is used here\n\nThis skill is not only a markdown description.\nIt includes both executable code and packaged project source:\n\n- `scripts/run_grap_skill.py`\n- `python-package/src/auto_grap_skill/`\n\nThe bundled code is there so the installed skill can execute its graph\ncapabilities inside OpenClaw.\n\nFor users of the skill bundle, the important interaction surface is:\n\n- `/grap-skill build`\n- `/grap-skill query`\n- `/grap-skill look`\n\nYou do not need to use the underlying Python wrapper directly unless you are\ndebugging the bundle internals.\n\n## Skill usage\n\n- Use `/grap-skill build` to scan local skill folders and create a `graph.json`\n- Use `/grap-skill query` to select one primary skill plus complementary support from an existing graph\n- Use `/grap-skill look` to render the current graph as an HTML visualization\n\n## Cross discovery\n\nThe GitHub repository is the main development version and the official Python\npackage source.\n\nUse the GitHub version when you want:\n\n- a full source checkout\n- editable installs\n- direct Python package development\n\nUse this ClawHub/OpenClaw skill version when you want:\n\n- `openclaw skills install skill-graph-for-analogical-reasoning`\n- a skill-style wrapper around the packaged graph commands\n- a bundle that can be installed into an OpenClaw workspace\n\nFile v1.0.2:_meta.json\n\n{\n  \"ownerId\": \"kn76ts9v9tgsgadm8pww346n6h836dvn\",\n  \"slug\": \"skill-graph-for-analogical-reasoning\",\n  \"version\": \"1.0.2\",\n  \"publishedAt\": 1778477265846\n}\n\nFile v1.0.2:reference.md\n\n# Reference\n\n## Project idea\n\nSkill Graph for Analogical Reasoning builds a graph over `SKILL.md`-based skills and tries to retrieve skills the way a careful human would:\n\n- one primary skill\n- a few complementary supporting skills\n- no naive pile of near-duplicate instructions\n\n## Build algorithm\n\n`build` extracts from each skill:\n\n- description\n- trigger phrases\n- keywords\n- tool/code references\n- runtime constraints\n\nThen it computes weakly supervised relations between skill pairs.\n\nStored views include:\n\n- `similarity` — static closeness between skills\n- `complementarity` — a proxy for \"useful together without being redundant\"\n\n## Query algorithm\n\n### Step 1: choose one primary skill\n\nPrimary-skill ranking uses signals such as:\n\n- intent match\n- trigger match\n- object match\n- readiness\n- specificity\n- lexical match\n\n### Step 2: choose complementary support\n\nSupporting-skill ranking uses:\n\n- `task_relevance`\n- `complementarity`\n- `execution_support`\n- `redundancy_with_primary` penalty\n\nThe goal is **not** to attach several highly similar skills.\nThe goal is to attach only the skills that actually add missing coverage.\n\n## Look view\n\n`look` renders the graph and lets the user switch between:\n\n- `Similarity`\n- `Complementarity`\n\nEdges are colored from blue (`0`) to red (`1`) in the active view.\n\nFile v1.0.2:python-package/pyproject.toml\n\n[build-system]\nrequires = [\"setuptools>=68\", \"wheel\"]\nbuild-backend = \"setuptools.build_meta\"\n\n[project]\nname = \"skill-graph-for-analogical-reasoning\"\nversion = \"0.1.0\"\ndescription = \"Skill Graph for Analogical Reasoning: graph-powered retrieval over AgentSkills-compatible SKILL.md folders.\"\nlicense = \"Apache-2.0\"\nauthors = [\n  { name = \"huangzhizheng\" },\n]\nkeywords = [\"skills\", \"graph\", \"analogical-reasoning\", \"agent-skills\", \"retrieval\"]\nreadme = \"README.md\"\nrequires-python = \">=3.11\"\ndependencies = [\n  \"PyYAML>=6.0\",\n]\n\n[project.scripts]\ngrap-skill = \"auto_grap_skill.cli:main\"\n\n[tool.setuptools]\npackage-dir = {\"\" = \"src\"}\n\n[tool.setuptools.packages.find]\nwhere = [\"src\"]\n\nArchive v1.0.1: 11 files, 23747 bytes\n\nFiles: python-package/pyproject.toml (682b), python-package/README.md (6173b), python-package/src/auto_grap_skill/__init__.py (67b), python-package/src/auto_grap_skill/__main__.py (80b), python-package/src/auto_grap_skill/cli.py (26790b), python-package/src/auto_grap_skill/core.py (34949b), README.md (2067b), reference.md (1321b), scripts/run_grap_skill.py (1294b), SKILL.md (3812b), _meta.json (155b)\n\nFile v1.0.1:SKILL.md\n\n---\nname: grap-skill\ndescription: Skill Graph for Analogical Reasoning. Build a graph over SKILL.md skills, choose one primary skill, and retrieve complementary support instead of naively attaching top similar skills.\nuser-invocable: true\nmetadata: {\"openclaw\":{\"requires\":{\"bins\":[\"python3\"]}}}\n---\n\n# Skill Graph for Analogical Reasoning\n\nUse this skill when the user wants to work with a **graph skill** over local `SKILL.md` folders.\n\nThis skill is for:\n\n- graph-based skill indexing\n- analogical reasoning and transfer\n- one primary skill plus complementary support\n- avoiding naive \"top similar skills\" retrieval\n\nThe full Python package and CLI for this project are available in the GitHub repository.\n\n## What this skill does\n\nThis skill wraps the `grap-skill` capability.\n\nIt supports three primary commands:\n\n- `/grap-skill build`\n- `/grap-skill query`\n- `/grap-skill look`\n\n## Core rule\n\n- `build` is the only command that may scan skill folders and update the graph.\n- `query` and `look` are read-only against an existing `graph.json`.\n- Do not silently rebuild during `query`.\n\n## Code-backed usage\n\nThis skill is allowed to call code.\n\nThe `python3 {baseDir}/scripts/run_grap_skill.py ...` commands below are the\nstable execution entrypoints intended for the skill runtime and for model-driven\ntool use. They let the skill call a controlled wrapper inside the installed\nskill bundle instead of relying on ad hoc shell reconstruction.\n\nPreferred execution order:\n\n1. Use the helper script in `{baseDir}/scripts/run_grap_skill.py`.\n2. If the Python package is installed in the current interpreter, the wrapper may use `python -m auto_grap_skill`.\n3. If neither bundled code nor the local Python package is available, direct the user to the GitHub repository for this project and install the Python package first.\n\n## Primary commands\n\n### `/grap-skill build`\n\n```bash\npython3 {baseDir}/scripts/run_grap_skill.py build --source <skills_dir> --output <graph_dir>\n```\n\nExample:\n\n```bash\npython3 {baseDir}/scripts/run_grap_skill.py build --source ./skills-main --output ./.grap-skill\n```\n\n### `/grap-skill query`\n\n```bash\npython3 {baseDir}/scripts/run_grap_skill.py query \"<task text>\" --graph <graph_json_path>\n```\n\nExample:\n\n```bash\npython3 {baseDir}/scripts/run_grap_skill.py query \"edit a docx file with comments\" --graph ./.grap-skill/graph.json\n```\n\n### `/grap-skill look`\n\n```bash\npython3 {baseDir}/scripts/run_grap_skill.py look --graph <graph_json_path> --output <html_path>\n```\n\nExample:\n\n```bash\npython3 {baseDir}/scripts/run_grap_skill.py look --graph ./.grap-skill/graph.json --output ./.grap-skill/graph-look.html\n```\n\n## How to interpret results\n\n- `primary_skill` is the execution center.\n- `supporting_skills` are the only skills that should normally supplement the primary skill in context.\n- `fallback_skills` are substitutes for failure paths.\n- `similar_skills` are for graph browsing, not default prompt context.\n\n## Why this is different\n\nMost retrieval systems stop at similarity.\nThis one tries to separate:\n\n- the skill that should lead execution\n- the skills that add complementary coverage\n- the skills that are merely nearby or redundant\n\nThat is the whole analogical-reasoning goal of this project.\n\n## More files in this skill\n\n- `README.md` — human-facing usage and install notes\n- `reference.md` — algorithm and result interpretation\n- `scripts/run_grap_skill.py` — helper wrapper that calls the actual Python package/CLI\n\n## GitHub version\n\nThe GitHub release of this project should also point users back to this skill\nbundle for skill-style installation:\n\n- ClawHub/OpenClaw install: `openclaw skills install skill-graph-for-analogical-reasoning`\n- GitHub/Python install: use the repository's Python package and local CLI when a full source checkout is preferred\n\nFile v1.0.1:python-package/README.md\n\n# Skill Graph for Analogical Reasoning\n\n[![License: Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](./LICENSE)\n\n`Skill Graph for Analogical Reasoning` is a graph-powered retrieval engine for AgentSkills-compatible `SKILL.md` folders.\n\n- pick one `primary_skill` as the execution center\n- retrieve a small set of `supporting_skills` that add complementary value\n- keep `similar_skills` separate from the default prompt context\n- use the graph to support transfer, analogy, and non-redundant composition\n\nThis project is built for graph skill retrieval, analogical reasoning, and\ncross-skill transfer over real skill folders.\n\n## Highlights\n\n- graph-based retrieval over `SKILL.md`\n- one `primary_skill` plus complementary support\n- not naive `top-k similar skills`\n- read-only query over a persisted `graph.json`\n- whole-graph HTML visualization with edge explanations\n- code-backed ClawHub/OpenClaw skill bundle\n\n## What You Get\n\n- multiple skills say almost the same thing\n- context gets wider but not smarter\n- execution focus becomes weaker\n- the model sees redundancy, not real analogy\n\n- `primary_skill` answers: which skill should lead?\n- `supporting_skills` answer: which skills fill what the primary skill does not cover?\n- `fallback_skills` answer: which nearby options are substitutes rather than companions?\n- `similar_skills` answer: what is graph-nearby, but should not be injected by default?\n\nThe graph is designed to separate leadership, support, fallback, and redundancy instead of collapsing everything into similarity.\n\n## Quick Start\n\n### Install\n\n```bash\npython3 -m venv .venv\n./.venv/bin/python -m pip install -e .\n```\n\n### Build A Graph\n\n```bash\n./.venv/bin/grap-skill build --source ./skills-main --output ./.grap-skill\n```\n\n### Query The Graph\n\n```bash\n./.venv/bin/grap-skill query \"edit a docx file with comments\" --graph ./.grap-skill/graph.json\n```\n\n### Render The Graph\n\n```bash\n./.venv/bin/grap-skill look --graph ./.grap-skill/graph.json --output ./.grap-skill/graph-look.html\n```\n\n## Core Commands\n\n### `build`\n\n`build` is the only command allowed to scan skill folders and update the graph.\n\nIt currently:\n\n- recursively scans `SKILL.md` and `skill.md`\n- parses frontmatter and markdown instructions\n- extracts descriptions, triggers, keywords, tool references, code references, and runtime constraints\n- constructs a weakly supervised graph from those signals\n- persists both a `similarity` view and a `complementarity` view into `graph.json`\n\n`query` and `look` are read-only over the saved graph and do not silently rebuild.\n\n### `query`\n\n`query` selects a structured result instead of dumping a similarity list.\n\nIt returns:\n\n- `primary_skill`\n- `supporting_skills`\n- `fallback_skills`\n- `similar_skills`\n\nThe important part is how `supporting_skills` are selected.\nThey are not chosen by raw similarity.\n\nThey are scored by a balance of:\n\n- `task_relevance`\n- `complementarity`\n- `execution_support`\n- `redundancy_with_primary`\n\nCurrent support scoring is:\n\n```text\nsupport_score =\n  0.30 * task_relevance\n  + 0.30 * complementarity\n  + 0.25 * execution_support\n  - 0.25 * redundancy_with_primary\n```\n\nThis is the mechanism that moves retrieval away from nearest-neighbor packing and toward main-skill-plus-support selection.\n\n### `look`\n\n`look` renders the current graph as a standalone HTML view.\n\nThe visualization currently supports:\n\n- full-graph browsing\n- `Similarity` and `Complementarity` view switching\n- edge color mapping from blue (`0`) to red (`1`)\n- click-edge explanations with natural-language summaries\n- evidence and score breakdowns for why an edge exists\n\n## Graph Signals\n\nAt build time, the graph tries to infer relationships from `SKILL.md` itself, including:\n\n- semantic description overlap\n- shared keywords and trigger language\n- tool and code affinity\n- runtime and constraint compatibility\n\nAt query time, high-similarity neighbors can still be excluded from `supporting_skills` if they do not add enough non-redundant value.\n\n## Example Output Shape\n\n```json\n{\n  \"primary_skill\": \"...\",\n  \"supporting_skills\": [\"...\"],\n  \"fallback_skills\": [\"...\"],\n  \"similar_skills\": [\"...\"]\n}\n```\n\nResult interpretation:\n\n- `primary_skill` is the execution center\n- `supporting_skills` are the only skills that should usually supplement context\n- `fallback_skills` are substitutes for failure paths\n- `similar_skills` are for browsing and inspection, not default prompt packing\n\n## Current Status\n\nThis repository is already usable as an early MVP.\n\nWorking now:\n\n- graph build over `SKILL.md` folders\n- read-only query over persisted `graph.json`\n- primary-skill selection\n- complementary support selection\n- whole-graph HTML visualization\n- edge explanations with evidence\n\nStill early by design:\n\n- stronger relations such as prerequisite and composition are not inferred yet\n- graph quality is still bounded by what can be extracted from `SKILL.md`\n- there is no trace-driven self-improvement loop yet\n\n## Repository Layout\n\n- `src/auto_grap_skill/` contains the Python package and CLI\n- `skills/grap-skill/` contains the local skill wrapper\n- `releases/github/` contains a visible GitHub-facing source snapshot\n- `releases/clawhub-skill/` contains the final ClawHub upload bundle\n- `releases/gist/` contains the long-form public markdown version\n\n## Python Package And CLI\n\nThe installable package name is:\n\n- `skill-graph-for-analogical-reasoning`\n\nThe local CLI command is:\n\n- `grap-skill`\n\nThe module entrypoint also works:\n\n```bash\n./.venv/bin/python -m auto_grap_skill --help\n```\n\n## ClawHub Version\n\nA code-backed ClawHub skill bundle is prepared in:\n\n- `releases/clawhub-skill/skill-graph-for-analogical-reasoning`\n\nThat bundle is not markdown-only.\nIt includes:\n\n- `SKILL.md`\n- supporting documentation\n- `scripts/run_grap_skill.py`\n- `python-package/src/auto_grap_skill/`\n\nThe ClawHub bundle now carries both the wrapper entrypoint and the packaged Python source used by the project.\n\n## Why The Name\n\n`Skill Graph for Analogical Reasoning` is intentionally explicit.\n\nIt says what the project actually is:\n\n- a skill graph\n- for analogical reasoning\n- over real `SKILL.md` skills\n\nFile v1.0.1:README.md\n\n# Skill Graph for Analogical Reasoning\n\nThis is the ClawHub/OpenClaw skill bundle for the `Skill Graph for Analogical Reasoning` project.\n\nIt exposes the `grap-skill` capability as a skill-oriented interface around three main commands:\n\n- `/grap-skill build`\n- `/grap-skill query`\n- `/grap-skill look`\n\n## What this version is\n\nThis skill version is for users who want to use the graph capability through a skill workflow.\n\nThe full source code, Python package, and CLI live in the GitHub repository for this project.\n\n## What this skill can do\n\n- build a graph over local `SKILL.md` folders\n- select one primary skill for a task\n- retrieve complementary support instead of simply taking the top similar skills\n- render the skill network as a visual graph\n\n## How code is used here\n\nThis skill is not only a markdown description.\nIt includes both executable code and packaged project source:\n\n- `scripts/run_grap_skill.py`\n- `python-package/src/auto_grap_skill/`\n\nThe bundled code is there so the installed skill can execute its graph\ncapabilities inside OpenClaw.\n\nFor users of the skill bundle, the important interaction surface is:\n\n- `/grap-skill build`\n- `/grap-skill query`\n- `/grap-skill look`\n\nYou do not need to use the underlying Python wrapper directly unless you are\ndebugging the bundle internals.\n\n## Skill usage\n\n- Use `/grap-skill build` to scan local skill folders and create a `graph.json`\n- Use `/grap-skill query` to select one primary skill plus complementary support from an existing graph\n- Use `/grap-skill look` to render the current graph as an HTML visualization\n\n## Cross discovery\n\nThe GitHub repository is the main development version and the official Python\npackage source.\n\nUse the GitHub version when you want:\n\n- a full source checkout\n- editable installs\n- direct Python package development\n\nUse this ClawHub/OpenClaw skill version when you want:\n\n- `openclaw skills install skill-graph-for-analogical-reasoning`\n- a skill-style wrapper around the packaged graph commands\n- a bundle that can be installed into an OpenClaw workspace\n\nFile v1.0.1:_meta.json\n\n{\n  \"ownerId\": \"kn76ts9v9tgsgadm8pww346n6h836dvn\",\n  \"slug\": \"skill-graph-for-analogical-reasoning\",\n  \"version\": \"1.0.1\",\n  \"publishedAt\": 1778473135986\n}\n\nFile v1.0.1:reference.md\n\n# Reference\n\n## Project idea\n\nSkill Graph for Analogical Reasoning builds a graph over `SKILL.md`-based skills and tries to retrieve skills the way a careful human would:\n\n- one primary skill\n- a few complementary supporting skills\n- no naive pile of near-duplicate instructions\n\n## Build algorithm\n\n`build` extracts from each skill:\n\n- description\n- trigger phrases\n- keywords\n- tool/code references\n- runtime constraints\n\nThen it computes weakly supervised relations between skill pairs.\n\nStored views include:\n\n- `similarity` — static closeness between skills\n- `complementarity` — a proxy for \"useful together without being redundant\"\n\n## Query algorithm\n\n### Step 1: choose one primary skill\n\nPrimary-skill ranking uses signals such as:\n\n- intent match\n- trigger match\n- object match\n- readiness\n- specificity\n- lexical match\n\n### Step 2: choose complementary support\n\nSupporting-skill ranking uses:\n\n- `task_relevance`\n- `complementarity`\n- `execution_support`\n- `redundancy_with_primary` penalty\n\nThe goal is **not** to attach several highly similar skills.\nThe goal is to attach only the skills that actually add missing coverage.\n\n## Look view\n\n`look` renders the graph and lets the user switch between:\n\n- `Similarity`\n- `Complementarity`\n\nEdges are colored from blue (`0`) to red (`1`) in the active view.\n\nFile v1.0.1:python-package/pyproject.toml\n\n[build-system]\nrequires = [\"setuptools>=68\", \"wheel\"]\nbuild-backend = \"setuptools.build_meta\"\n\n[project]\nname = \"skill-graph-for-analogical-reasoning\"\nversion = \"0.1.0\"\ndescription = \"Skill Graph for Analogical Reasoning: graph-powered retrieval over AgentSkills-compatible SKILL.md folders.\"\nlicense = \"Apache-2.0\"\nauthors = [\n  { name = \"huangzhizheng\" },\n]\nkeywords = [\"skills\", \"graph\", \"analogical-reasoning\", \"agent-skills\", \"retrieval\"]\nreadme = \"README.md\"\nrequires-python = \">=3.11\"\ndependencies = [\n  \"PyYAML>=6.0\",\n]\n\n[project.scripts]\ngrap-skill = \"auto_grap_skill.cli:main\"\n\n[tool.setuptools]\npackage-dir = {\"\" = \"src\"}\n\n[tool.setuptools.packages.find]\nwhere = [\"src\"]\n\nArchive v1.0.0: 11 files, 23258 bytes\n\nFiles: python-package/pyproject.toml (682b), python-package/README.md (6167b), python-package/src/auto_grap_skill/__init__.py (67b), python-package/src/auto_grap_skill/__main__.py (80b), python-package/src/auto_grap_skill/cli.py (25935b), python-package/src/auto_grap_skill/core.py (34949b), README.md (1910b), reference.md (1321b), scripts/run_grap_skill.py (1258b), SKILL.md (3108b), _meta.json (155b)\n\nFile v1.0.0:SKILL.md\n\n---\nname: grap-skill\ndescription: Skill Graph for Analogical Reasoning. Build a graph over SKILL.md skills, choose one primary skill, and retrieve complementary support instead of naively attaching top similar skills.\nuser-invocable: true\nmetadata: {\"openclaw\":{\"requires\":{\"bins\":[\"python3\"]}}}\n---\n\n# Skill Graph for Analogical Reasoning\n\nUse this skill when the user wants to work with a **graph skill** over local `SKILL.md` folders.\n\nThis skill is for:\n\n- graph-based skill indexing\n- analogical reasoning / 举一反三\n- one primary skill plus complementary support\n- avoiding naive \"top similar skills\" retrieval\n\nThe full Python package and CLI for this project are available in the GitHub repository.\n\n## What this skill does\n\nThis skill wraps the `grap-skill` capability.\n\nIt supports three primary commands:\n\n- `/grap-skill build`\n- `/grap-skill query`\n- `/grap-skill look`\n\n## Core rule\n\n- `build` is the only command that may scan skill folders and update the graph.\n- `query` and `look` are read-only against an existing `graph.json`.\n- Do not silently rebuild during `query`.\n\n## Code-backed usage\n\nThis skill is allowed to call code.\n\nPreferred execution order:\n\n1. If a local `grap-skill` CLI is already available, use it directly.\n2. Otherwise, use the helper script in `{baseDir}/scripts/run_grap_skill.py`.\n3. If the package is not installed yet, direct the user to the GitHub repository for this project and install the Python package first.\n\n## Primary commands\n\n### `/grap-skill build`\n\n```bash\npython3 {baseDir}/scripts/run_grap_skill.py build --source <skills_dir> --output <graph_dir>\n```\n\nExample:\n\n```bash\npython3 {baseDir}/scripts/run_grap_skill.py build --source ./skills-main --output ./.grap-skill\n```\n\n### `/grap-skill query`\n\n```bash\npython3 {baseDir}/scripts/run_grap_skill.py query \"<task text>\" --graph <graph_json_path>\n```\n\nExample:\n\n```bash\npython3 {baseDir}/scripts/run_grap_skill.py query \"edit a docx file with comments\" --graph ./.grap-skill/graph.json\n```\n\n### `/grap-skill look`\n\n```bash\npython3 {baseDir}/scripts/run_grap_skill.py look --graph <graph_json_path> --output <html_path>\n```\n\nExample:\n\n```bash\npython3 {baseDir}/scripts/run_grap_skill.py look --graph ./.grap-skill/graph.json --output ./.grap-skill/graph-look.html\n```\n\n## How to interpret results\n\n- `primary_skill` is the execution center.\n- `supporting_skills` are the only skills that should normally supplement the primary skill in context.\n- `fallback_skills` are substitutes for failure paths.\n- `similar_skills` are for graph browsing, not default prompt context.\n\n## Why this is different\n\nMost retrieval systems stop at similarity.\nThis one tries to separate:\n\n- the skill that should lead execution\n- the skills that add complementary coverage\n- the skills that are merely nearby or redundant\n\nThat is the whole analogical-reasoning goal of this project.\n\n## More files in this skill\n\n- `README.md` — human-facing usage and install notes\n- `reference.md` — algorithm and result interpretation\n- `scripts/run_grap_skill.py` — helper wrapper that calls the actual Python package/CLI\n\nFile v1.0.0:python-package/README.md\n\n# Skill Graph for Analogical Reasoning\n\n[![License: Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](./LICENSE)\n\n`Skill Graph for Analogical Reasoning` is a graph-powered retrieval engine for AgentSkills-compatible `SKILL.md` folders.\n\n- pick one `primary_skill` as the execution center\n- retrieve a small set of `supporting_skills` that add complementary value\n- keep `similar_skills` separate from the default prompt context\n- use the graph to support transfer, analogy, and non-redundant composition\n\nThis project is built for graph skill retrieval, analogical reasoning, and `举一反三` over real skill folders.\n\n## Highlights\n\n- graph-based retrieval over `SKILL.md`\n- one `primary_skill` plus complementary support\n- not naive `top-k similar skills`\n- read-only query over a persisted `graph.json`\n- whole-graph HTML visualization with edge explanations\n- code-backed ClawHub/OpenClaw skill bundle\n\n## What You Get\n\n- multiple skills say almost the same thing\n- context gets wider but not smarter\n- execution focus becomes weaker\n- the model sees redundancy, not real analogy\n\n- `primary_skill` answers: which skill should lead?\n- `supporting_skills` answer: which skills fill what the primary skill does not cover?\n- `fallback_skills` answer: which nearby options are substitutes rather than companions?\n- `similar_skills` answer: what is graph-nearby, but should not be injected by default?\n\nThe graph is designed to separate leadership, support, fallback, and redundancy instead of collapsing everything into similarity.\n\n## Quick Start\n\n### Install\n\n```bash\npython3 -m venv .venv\n./.venv/bin/python -m pip install -e .\n```\n\n### Build A Graph\n\n```bash\n./.venv/bin/grap-skill build --source ./skills-main --output ./.grap-skill\n```\n\n### Query The Graph\n\n```bash\n./.venv/bin/grap-skill query \"edit a docx file with comments\" --graph ./.grap-skill/graph.json\n```\n\n### Render The Graph\n\n```bash\n./.venv/bin/grap-skill look --graph ./.grap-skill/graph.json --output ./.grap-skill/graph-look.html\n```\n\n## Core Commands\n\n### `build`\n\n`build` is the only command allowed to scan skill folders and update the graph.\n\nIt currently:\n\n- recursively scans `SKILL.md` and `skill.md`\n- parses frontmatter and markdown instructions\n- extracts descriptions, triggers, keywords, tool references, code references, and runtime constraints\n- constructs a weakly supervised graph from those signals\n- persists both a `similarity` view and a `complementarity` view into `graph.json`\n\n`query` and `look` are read-only over the saved graph and do not silently rebuild.\n\n### `query`\n\n`query` selects a structured result instead of dumping a similarity list.\n\nIt returns:\n\n- `primary_skill`\n- `supporting_skills`\n- `fallback_skills`\n- `similar_skills`\n\nThe important part is how `supporting_skills` are selected.\nThey are not chosen by raw similarity.\n\nThey are scored by a balance of:\n\n- `task_relevance`\n- `complementarity`\n- `execution_support`\n- `redundancy_with_primary`\n\nCurrent support scoring is:\n\n```text\nsupport_score =\n  0.30 * task_relevance\n  + 0.30 * complementarity\n  + 0.25 * execution_support\n  - 0.25 * redundancy_with_primary\n```\n\nThis is the mechanism that moves retrieval away from nearest-neighbor packing and toward main-skill-plus-support selection.\n\n### `look`\n\n`look` renders the current graph as a standalone HTML view.\n\nThe visualization currently supports:\n\n- full-graph browsing\n- `Similarity` and `Complementarity` view switching\n- edge color mapping from blue (`0`) to red (`1`)\n- click-edge explanations with natural-language summaries\n- evidence and score breakdowns for why an edge exists\n\n## Graph Signals\n\nAt build time, the graph tries to infer relationships from `SKILL.md` itself, including:\n\n- semantic description overlap\n- shared keywords and trigger language\n- tool and code affinity\n- runtime and constraint compatibility\n\nAt query time, high-similarity neighbors can still be excluded from `supporting_skills` if they do not add enough non-redundant value.\n\n## Example Output Shape\n\n```json\n{\n  \"primary_skill\": \"...\",\n  \"supporting_skills\": [\"...\"],\n  \"fallback_skills\": [\"...\"],\n  \"similar_skills\": [\"...\"]\n}\n```\n\nResult interpretation:\n\n- `primary_skill` is the execution center\n- `supporting_skills` are the only skills that should usually supplement context\n- `fallback_skills` are substitutes for failure paths\n- `similar_skills` are for browsing and inspection, not default prompt packing\n\n## Current Status\n\nThis repository is already usable as an early MVP.\n\nWorking now:\n\n- graph build over `SKILL.md` folders\n- read-only query over persisted `graph.json`\n- primary-skill selection\n- complementary support selection\n- whole-graph HTML visualization\n- edge explanations with evidence\n\nStill early by design:\n\n- stronger relations such as prerequisite and composition are not inferred yet\n- graph quality is still bounded by what can be extracted from `SKILL.md`\n- there is no trace-driven self-improvement loop yet\n\n## Repository Layout\n\n- `src/auto_grap_skill/` contains the Python package and CLI\n- `skills/grap-skill/` contains the local skill wrapper\n- `releases/github/` contains a visible GitHub-facing source snapshot\n- `releases/clawhub-skill/` contains the final ClawHub upload bundle\n- `releases/gist/` contains the long-form public markdown version\n\n## Python Package And CLI\n\nThe installable package name is:\n\n- `skill-graph-for-analogical-reasoning`\n\nThe local CLI command is:\n\n- `grap-skill`\n\nThe module entrypoint also works:\n\n```bash\n./.venv/bin/python -m auto_grap_skill --help\n```\n\n## ClawHub Version\n\nA code-backed ClawHub skill bundle is prepared in:\n\n- `releases/clawhub-skill/skill-graph-for-analogical-reasoning`\n\nThat bundle is not markdown-only.\nIt includes:\n\n- `SKILL.md`\n- supporting documentation\n- `scripts/run_grap_skill.py`\n- `python-package/src/auto_grap_skill/`\n\nThe ClawHub bundle now carries both the wrapper entrypoint and the packaged Python source used by the project.\n\n## Why The Name\n\n`Skill Graph for Analogical Reasoning` is intentionally explicit.\n\nIt says what the project actually is:\n\n- a skill graph\n- for analogical reasoning\n- over real `SKILL.md` skills\n\nFile v1.0.0:README.md\n\n# Skill Graph for Analogical Reasoning\n\nThis is the ClawHub/OpenClaw skill bundle for the `Skill Graph for Analogical Reasoning` project.\n\nIt exposes the `grap-skill` capability as a skill-oriented interface around three main commands:\n\n- `/grap-skill build`\n- `/grap-skill query`\n- `/grap-skill look`\n\n## What this version is\n\nThis skill version is for users who want to use the graph capability through a skill workflow.\n\nThe full source code, Python package, and CLI live in the GitHub repository for this project.\n\n## What this skill can do\n\n- build a graph over local `SKILL.md` folders\n- select one primary skill for a task\n- retrieve complementary support instead of simply taking the top similar skills\n- render the skill network as a visual graph\n\n## How code is used here\n\nThis skill is not only a markdown description.\nIt includes both executable code and packaged project source:\n\n- `scripts/run_grap_skill.py`\n- `python-package/src/auto_grap_skill/`\n\nThe helper tries to run the real `grap-skill` implementation first, then falls back to the bundled package source inside this skill.\n\nPreferred execution order:\n\n1. use an installed `grap-skill` CLI if present\n2. otherwise try `python -m auto_grap_skill`\n3. otherwise use the bundled `python-package` source included in this skill\n4. if dependencies are still missing, install the GitHub Python package for this project first\n\n## Examples\n\n### Build\n\n```bash\npython3 {baseDir}/scripts/run_grap_skill.py build --source ./skills-main --output ./.grap-skill\n```\n\n### Query\n\n```bash\npython3 {baseDir}/scripts/run_grap_skill.py query \"fill in a PDF form\" --graph ./.grap-skill/graph.json\n```\n\n### Look\n\n```bash\npython3 {baseDir}/scripts/run_grap_skill.py look --graph ./.grap-skill/graph.json --output ./.grap-skill/graph-look.html\n```\n\n## Cross discovery\n\nThe GitHub repository is the main development version and the official Python package source.\n\nFile v1.0.0:_meta.json\n\n{\n  \"ownerId\": \"kn76ts9v9tgsgadm8pww346n6h836dvn\",\n  \"slug\": \"skill-graph-for-analogical-reasoning\",\n  \"version\": \"1.0.0\",\n  \"publishedAt\": 1778463573527\n}\n\nFile v1.0.0:reference.md\n\n# Reference\n\n## Project idea\n\nSkill Graph for Analogical Reasoning builds a graph over `SKILL.md`-based skills and tries to retrieve skills the way a careful human would:\n\n- one primary skill\n- a few complementary supporting skills\n- no naive pile of near-duplicate instructions\n\n## Build algorithm\n\n`build` extracts from each skill:\n\n- description\n- trigger phrases\n- keywords\n- tool/code references\n- runtime constraints\n\nThen it computes weakly supervised relations between skill pairs.\n\nStored views include:\n\n- `similarity` — static closeness between skills\n- `complementarity` — a proxy for \"useful together without being redundant\"\n\n## Query algorithm\n\n### Step 1: choose one primary skill\n\nPrimary-skill ranking uses signals such as:\n\n- intent match\n- trigger match\n- object match\n- readiness\n- specificity\n- lexical match\n\n### Step 2: choose complementary support\n\nSupporting-skill ranking uses:\n\n- `task_relevance`\n- `complementarity`\n- `execution_support`\n- `redundancy_with_primary` penalty\n\nThe goal is **not** to attach several highly similar skills.\nThe goal is to attach only the skills that actually add missing coverage.\n\n## Look view\n\n`look` renders the graph and lets the user switch between:\n\n- `Similarity`\n- `Complementarity`\n\nEdges are colored from blue (`0`) to red (`1`) in the active view.\n\nFile v1.0.0:python-package/pyproject.toml\n\n[build-system]\nrequires = [\"setuptools>=68\", \"wheel\"]\nbuild-backend = \"setuptools.build_meta\"\n\n[project]\nname = \"skill-graph-for-analogical-reasoning\"\nversion = \"0.1.0\"\ndescription = \"Skill Graph for Analogical Reasoning: graph-powered retrieval over AgentSkills-compatible SKILL.md folders.\"\nlicense = \"Apache-2.0\"\nauthors = [\n  { name = \"huangzhizheng\" },\n]\nkeywords = [\"skills\", \"graph\", \"analogical-reasoning\", \"agent-skills\", \"retrieval\"]\nreadme = \"README.md\"\nrequires-python = \">=3.11\"\ndependencies = [\n  \"PyYAML>=6.0\",\n]\n\n[project.scripts]\ngrap-skill = \"auto_grap_skill.cli:main\"\n\n[tool.setuptools]\npackage-dir = {\"\" = \"src\"}\n\n[tool.setuptools.packages.find]\nwhere = [\"src\"]","readmeExcerpt":"Skill: skill-graph-for-analogical-reasoning Owner: h4444433333 Summary: Skill Graph for Analogical Reasoning. Build a graph over SKILL.md skills, choose one primary skill, and retrieve complementary support instead of naively att... Tags: latest:1.0.4 Version history: v1.0.4 | 2026-05-28T02:47:02.457Z | user - Added _meta.json for enhanced metadata support. - Improved guidance for handling supporting skills: only use","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"python3 {baseDir}/scripts/run_grap_skill.py build --source <skills_dir> --output <graph_dir>"},{"language":"bash","snippet":"python3 {baseDir}/scripts/run_grap_skill.py build --source ./skills-main --output ./.grap-skill"},{"language":"bash","snippet":"python3 {baseDir}/scripts/run_grap_skill.py query \"<task text>\" --graph <graph_json_path>"},{"language":"bash","snippet":"python3 {baseDir}/scripts/run_grap_skill.py query \"edit a docx file with comments\" --graph ./.grap-skill/graph.json"},{"language":"bash","snippet":"python3 {baseDir}/scripts/run_grap_skill.py look --graph <graph_json_path> --output <html_path>"},{"language":"bash","snippet":"python3 {baseDir}/scripts/run_grap_skill.py look --graph ./.grap-skill/graph.json --output ./.grap-skill/graph-look.html"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: grap-skill\ndescription: Skill Graph for Analogical Reasoning. Build a graph over SKILL.md skills, choose one primary skill, and retrieve complementary support instead of naively attaching top similar skills.\nuser-invocable: true\nmetadata: {\"openclaw\":{\"requires\":{\"bins\":[\"python3\"]}}}\n---\n\n# Skill Graph for Analogical Reasoning\n\nUse this skill when the user wants to work with a **graph skill** over local `SKILL.md` folders.\n\nThis skill is for:\n\n- graph-based skill indexing\n- analogical reasoning and transfer\n- one primary skill plus complementary support\n- avoiding naive \"top similar skills\" retrieval\n\nThe full Python package and CLI for this project are available in the GitHub repository.\n\n## What this skill does\n\nThis skill wraps the `grap-skill` capability.\n\nIt supports three primary commands:\n\n- `/grap-skill build`\n- `/grap-skill query`\n- `/grap-skill look`\n\n## Core rule\n\n- `build` is the only command that may scan skill folders and update the graph.\n- `query` and `look` are read-only against an existing `graph.json`.\n- Do not silently rebuild during `query`.\n\n## Code-backed usage\n\nThis skill is allowed to call code.\n\nThe `python3 {baseDir}/scripts/run_grap_skill.py ...` commands below are the\nstable execution entrypoints intended for the skill runtime and for model-driven\ntool use. They let the skill call a controlled wrapper inside the installed\nskill bundle instead of relying on ad hoc shell reconstruction.\n\nPreferred execution order:\n\n1. Use the helper script in `{baseDir}/scripts/run_grap_skill.py`.\n2. If the Python package is installed in the current interpreter, the wrapper may use `python -m auto_grap_skill`.\n3. If neither bundled code nor the local Python package is available, direct the user to the GitHub repository for this project and install the Python package first.\n\n## Primary commands\n\n### `/grap-skill build`\n\n```bash\npython3 {baseDir}/scripts/run_grap_skill.py build --source <skills_dir> --output <graph_dir>\n```\n\nExample:\n\n```bash\npython3 {baseDir}/scripts/run_grap_skill.py build --source ./skills-main --output ./.grap-skill\n```\n\n### `/grap-skill query`\n\n```bash\npython3 {baseDir}/scripts/run_grap_skill.py query \"<task text>\" --graph <graph_json_path>\n```\n\nExample:\n\n```bash\npython3 {baseDir}/scripts/run_grap_skill.py query \"edit a docx file with comments\" --graph ./.grap-skill/graph.json\n```\n\n### `/grap-skill look`\n\n```bash\npython3 {baseDir}/scripts/run_grap_skill.py look --graph <graph_json_path> --output <html_path>\n```\n\nExample:\n\n```bash\npython3 {baseDir}/scripts/run_grap_skill.py look --graph ./.grap-skill/graph.json --output ./.grap-skill/graph-look.html\n```\n\n## How to interpret results\n\n- `primary_skill` is the execution center.\n- Always treat `primary_skill` as the default lead. Use a `supporting_skill` only if it adds clear missing coverage and does not conflict with or dilute the primary skill. If a suggested supporting skill is not actually helpful for the current task, do not adopt it.\n- `supporting_skills"},{"path":"python-package/README.md","content":"# Skill Graph for Analogical Reasoning\n\n[![License: Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](./LICENSE)\n\n`Skill Graph for Analogical Reasoning` is a graph-powered retrieval engine for AgentSkills-compatible `SKILL.md` folders.\n\n- pick one `primary_skill` as the execution center\n- retrieve a small set of `supporting_skills` that add complementary value\n- keep `similar_skills` separate from the default prompt context\n- use the graph to support transfer, analogy, and non-redundant composition\n\nThis project is built for graph skill retrieval, analogical reasoning, and\ncross-skill transfer over real skill folders.\n\n## Highlights\n\n- graph-based retrieval over `SKILL.md`\n- one `primary_skill` plus complementary support\n- not naive `top-k similar skills`\n- read-only query over a persisted `graph.json`\n- whole-graph HTML visualization with edge explanations\n- code-backed ClawHub/OpenClaw skill bundle\n\n## What You Get\n\n- multiple skills say almost the same thing\n- context gets wider but not smarter\n- execution focus becomes weaker\n- the model sees redundancy, not real analogy\n\n- `primary_skill` answers: which skill should lead?\n- `supporting_skills` answer: which skills fill what the primary skill does not cover?\n- `fallback_skills` answer: which nearby options are substitutes rather than companions?\n- `similar_skills` answer: what is graph-nearby, but should not be injected by default?\n\nThe graph is designed to separate leadership, support, fallback, and redundancy instead of collapsing everything into similarity.\n\n## Quick Start\n\n### Install\n\n```bash\npython3 -m venv .venv\n./.venv/bin/python -m pip install -e .\n```\n\n### Build A Graph\n\n```bash\n./.venv/bin/grap-skill build --source ./skills-main --output ./.grap-skill\n```\n\n### Query The Graph\n\n```bash\n./.venv/bin/grap-skill query \"edit a docx file with comments\" --graph ./.grap-skill/graph.json\n```\n\n### Render The Graph\n\n```bash\n./.venv/bin/grap-skill look --graph ./.grap-skill/graph.json --output ./.grap-skill/graph-look.html\n```\n\n## Core Commands\n\n### `build`\n\n`build` is the only command allowed to scan skill folders and update the graph.\n\nIt currently:\n\n- recursively scans `SKILL.md` and `skill.md`\n- parses frontmatter and markdown instructions\n- extracts descriptions, triggers, keywords, tool references, code references, and runtime constraints\n- constructs a weakly supervised graph from those signals\n- persists both a `similarity` view and a `complementarity` view into `graph.json`\n\n`query` and `look` are read-only over the saved graph and do not silently rebuild.\n\n### `query`\n\n`query` selects a structured result instead of dumping a similarity list.\n\nIt returns:\n\n- `primary_skill`\n- `supporting_skills`\n- `fallback_skills`\n- `similar_skills`\n\nThe important part is how `supporting_skills` are selected.\nThey are not chosen by raw similarity.\n\nThey are scored by a balance of:\n\n- `task_relevance`\n- `complementarity`\n- `execution_support`\n- `redundancy_with_primary`\n\nCurrent s"},{"path":"README.md","content":"# Skill Graph for Analogical Reasoning\n\nThis is the ClawHub/OpenClaw skill bundle for the `Skill Graph for Analogical Reasoning` project.\n\nIt exposes the `grap-skill` capability as a skill-oriented interface around three main commands:\n\n- `/grap-skill build`\n- `/grap-skill query`\n- `/grap-skill look`\n\n## What this version is\n\nThis skill version is for users who want to use the graph capability through a skill workflow.\n\nThe full source code, Python package, and CLI live in the GitHub repository for this project.\n\n## What this skill can do\n\n- build a graph over local `SKILL.md` folders\n- select one primary skill for a task\n- retrieve complementary support instead of simply taking the top similar skills\n- render the skill network as a visual graph\n\n## Skill usage\n\n- Use `/grap-skill build` to scan local skill folders and create a `graph.json`\n- Use `/grap-skill query` to select one primary skill plus complementary support from an existing graph\n- Use `/grap-skill look` to render the current graph as an HTML visualization\n\n## Cross discovery\n\nThe GitHub repository is the main development version and the official Python\npackage source.\n\nUse the GitHub version when you want:\n\n- a full source checkout\n- editable installs\n- direct Python package development\n\nUse this ClawHub/OpenClaw skill version when you want:\n\n- `openclaw skills install skill-graph-for-analogical-reasoning`\n- a skill-style wrapper around the packaged graph commands\n- a bundle that can be installed into an OpenClaw workspace"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn76ts9v9tgsgadm8pww346n6h836dvn\",\n  \"slug\": \"skill-graph-for-analogical-reasoning\",\n  \"version\": \"1.0.4\",\n  \"publishedAt\": 1779936422457\n}"},{"path":"reference.md","content":"# Reference\n\n## Project idea\n\nSkill Graph for Analogical Reasoning builds a graph over `SKILL.md`-based skills and tries to retrieve skills the way a careful human would:\n\n- one primary skill\n- a few complementary supporting skills\n- no naive pile of near-duplicate instructions\n\n## Build algorithm\n\n`build` extracts from each skill:\n\n- description\n- trigger phrases\n- keywords\n- tool/code references\n- runtime constraints\n\nThen it computes weakly supervised relations between skill pairs.\n\nStored views include:\n\n- `similarity` — static closeness between skills\n- `complementarity` — a proxy for \"useful together without being redundant\"\n\n## Query algorithm\n\n### Step 1: choose one primary skill\n\nPrimary-skill ranking uses signals such as:\n\n- intent match\n- trigger match\n- object match\n- readiness\n- specificity\n- lexical match\n\n### Step 2: choose complementary support\n\nSupporting-skill ranking uses:\n\n- `task_relevance`\n- `complementarity`\n- `execution_support`\n- `redundancy_with_primary` penalty\n\nThe goal is **not** to attach several highly similar skills.\nThe goal is to attach only the skills that actually add missing coverage.\n\n## Look view\n\n`look` renders the graph and lets the user switch between:\n\n- `Similarity`\n- `Complementarity`\n\nEdges are colored from blue (`0`) to red (`1`) in the active view."}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":null,"editorialQuality":{"score":100,"threshold":65,"status":"thin","wordCount":1735,"uniquenessScore":38,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-12T00:11:20.540Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-12T00:11:20.540Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-12T21:25:01.090Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}