treemd
Markdown document analysis and navigation using the treemd CLI. Use when exploring markdown structure (heading trees, section extraction), querying markdown elements via tql (treemd query language), or piping markdown content for programmatic analysis. Also use before reading or editing large markdown files to survey structure, locate relevant sections, and avoid loading entire documents into context. Skill: treemd Owner: wei840222 Summary: Markdown document analysis and navigation using the treemd CLI. Use when exploring markdown structure (heading trees, section extraction), querying markdown elements via tql (treemd query language), or piping markdown content for programmatic analysis. Also use before reading or editing large markdown files to survey structure, locate relevant sections, and avoid loading entire
Rank
62
Safety
84
Downloads
1.1k
Updated
Oct 11, 2026
Version
1.0.2
Source
CLAWHUB
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 1.1K downloads reported by the source. Last updated 10/11/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · observed Oct 11, 2026
- Protocol compatibility
- OpenClawcompatibility · observed Oct 11, 2026
- Adoption signal
- 1.1K downloadsadoption · observed Oct 11, 2026
- Latest release
- 1.0.2release · observed Aug 15, 2026
- Handshake status
- UNKNOWNsecurity
Install and run
Setup complexity: low.
clawhub skill install s172jjkptk3smy0bv40ssjrz7n83fpys:treemd- Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
- Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-wei840222-treemd/snapshot"
Documentation
CLAWHUB
43,729 characters of source documentation, loaded on request.
Extracted files
4 files captured from the source.
SKILL.md
--- name: treemd description: Markdown document analysis and navigation using the treemd CLI. Use when exploring markdown structure (heading trees, section extraction), querying markdown elements via tql (treemd query language), or piping markdown content for programmatic analysis. Also use before reading or editing large markdown files to survey structure, locate relevant sections, and avoid loading entire documents into context. version: 1.0.1 homepage: https://github.com/Epistates/treemd license: MIT --- # treemd Skill Skill for working with the `treemd` markdown viewer and query tool. ## Overview `treemd` is a Rust-based CLI for markdown document analysis. It handles two primary workflows: 1. **Structural Navigation** — Explore document hierarchy top-down 2. **Query Navigation** — Navigate by asking structured questions For scripted/agent tasks, always use CLI mode. TUI mode is reserved for human interactive viewing. ## Agent Command Gate (Mandatory) Before invoking `treemd`, include at least one non-interactive action flag: `--tree`, `--list`/`-l`, `--count`, `--at-line`, `--section`/`-s`, `--query`/`-q`, `--query-help`, `--help`, or `--version`. Never invoke `treemd` with only a file path, a directory, a glob, or no arguments. Those forms launch the interactive TUI or file picker and can block an agent session. If no non-interactive action fits the task, do not invoke `treemd`; use another CLI workflow instead. Verify that the installed CLI is available and record its version before relying on version-sensitive tql or output-format behavior: ```bash command -v treemd >/dev/null && treemd --version ``` > **Project**: https://github.com/Epistates/treemd > **Install**: `cargo install treemd` or download binary from [releases](https://github.com/Epistates/treemd/releases) --- ## Line A: Structural Navigation Use this when encountering an unfamiliar document. Progress from overview → locate → extract. ### Step 1: Overview Understand the document skeleton before diving in. ```bash treemd --tree FILE.md # Visual tree with box-drawing characters treemd --count FILE.md # Heading count by level (h1–h6 breakdown + total) treemd -l FILE.md | head -20 # Quick scan of all headings ``` ### Step 2: Locate Pinpoint the sections relevant to your goal. ```bash treemd -l --filter "install" FILE.md # Fuzzy heading search (case-insensitive) treemd -l -L 2 --filter "API" FILE.md # Narrow by heading level + keyword treemd --at-line 150 FILE.md # "Which heading covers line 150?" ``` ### Step 3: Extract Pull entire sections or pipe content for downstream processing. ```bash treemd -s "Full Heading Text" FILE.md # Extract heading + content (must match full heading text exactly) cat FILE.md | treemd -s "Full Heading Text" - # Pipe stdin, extract from stream ``` > **Important**: `-s` requires the **exact full heading text** (including emoji and parentheses). Partial/fuzzy matches
_meta.json
{
"ownerId": "kn72br41m2qw276f02hss67hss81ywdp",
"slug": "treemd",
"version": "1.0.2",
"publishedAt": 1786803264752
}references/query-language.md
# treemd Query Language (tql) Reference A jq-like query language for navigating and extracting markdown structure. ## Element Selectors | Selector | Description | | ----------------- | ------------------------ | | `.h`, `.heading` | All headings (any level) | | `.h1` - `.h6` | Headings by level | | `.code` | All code blocks | | `.code[rust]` | Code blocks by language | | `.link`, `.a` | All links | | `.link[external]` | External links only | | `.img` | All images | | `.table` | All tables | | `.list` | All lists | | `.blockquote` | All blockquotes | ## Filters & Indexing ``` .h2[Features] # Heading containing "Features" (fuzzy match) .h2["Installation"] # Heading with exact text (must match full heading including emoji) .h2[0] # First h2 .h2[-1] # Last h2 .h2[1:3] # h2s at index 1 and 2 .h2[:3] # First 3 h2s ``` ## Hierarchy Operators ``` .h1 > .h2 # Direct child h2s under h1s .h1 >> .code # Code blocks anywhere under h1s (descendant) ``` ## Pipes ``` .h2 | text # Get heading text (strips ##) [.h2] | count # Count all h2s .code | lang # Get code block languages .link | url # Get link URLs ``` ## Collection Functions | Function | Description | Alias | | --------------------- | ----------------------------- | ----------------------- | | `count` | Count elements | `length`, `len`, `size` | | `first` | First element | `head` | | `last` | Last element | | | `limit(n)`, `take(n)` | First n elements | | | `skip(n)`, `drop(n)` | Skip first n elements | | | `nth(n)` | Get element at index | | | `reverse` | Reverse order | | | `sort` | Sort alphabetically | | | `sort_by(key)` | Sort by property | | | `unique` | Remove duplicates | | | `flatten` | Flatten nested arrays | | | `group_by(key)` | Group elements by key | | | `min`, `max` | Min/max numeric value | | | `add` | Sum numbers or concat strings | | ## String Functions | Function | Description | | ------------------------- | ----------------------- | | `text` | Get text representation | | `upper`, `lower` | Case conversi
skill-card.md
## Description: Markdown document analysis and navigation using the treemd CLI. This skill is ready for commercial/non-commercial use. ## Publisher: [wei840222](https://clawhub.ai/user/wei840222) ### License/Terms of Use: MIT-0 ## Use Case: Developers and agent operators use this skill to inspect Markdown structure, locate relevant sections, query Markdown elements with tql, and extract content without loading entire large documents into context. ### Deployment Geography for Use: Global ## Known Risks and Mitigations: Risk: Installing the external treemd CLI from an untrusted or unreviewed source could introduce ordinary supply-chain risk. Mitigation: Install treemd only from a trusted source; in stricter environments, pin a reviewed version and verify release checksums or signatures before use. Risk: Invoking treemd without a non-interactive action flag can launch the TUI or file picker and block an agent session. Mitigation: Use one of the documented non-interactive flags such as --tree, --list, --count, --section, --query, --help, or --version for agent tasks. Risk: Section extraction can fail when the requested heading text is partial or does not exactly match the document heading. Mitigation: List or filter headings first, then pass the exact full heading text to --section. Risk: Version-sensitive tql syntax or output-format behavior may differ across installed treemd versions. Mitigation: Check and record treemd --version before relying on version-sensitive query or output behavior. ## Reference(s): - [treemd Query Language (tql) Reference](references/query-language.md) - [treemd project homepage](https://github.com/Epistates/treemd) - [treemd releases](https://github.com/Epistates/treemd/releases) ## Skill Output: **Output Type(s):** [text, markdown, shell commands, guidance] **Output Format:** [Markdown guidance with inline shell commands and optional plain text, JSON, JSONL, or Markdown CLI output] **Output Parameters:** [1D] **Other Properties Related to Output:** [Requires the external treemd CLI; scripted agent usage must include a non-interactive action flag.] ## Skill Version(s): 1.0.2 (source: server release metadata; artifact frontmatter reports 1.0.1) ## Ethical Considerations: Users 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.
AionUi
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!
activepieces
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
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/wei840222/skills/treemd",
"sourceUrl": "https://clawhub.ai/wei840222/skills/treemd",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-11T10:56:29.484Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-wei840222-treemd/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-wei840222-treemd/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-11T10:56:29.484Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "1.1K downloads",
"href": "https://clawhub.ai/wei840222/treemd",
"sourceUrl": "https://clawhub.ai/wei840222/treemd",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-11T10:56:29.484Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "1.0.2",
"href": "https://clawhub.ai/wei840222/treemd",
"sourceUrl": "https://clawhub.ai/wei840222/treemd",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-08-15T14:14:24.752Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-wei840222-treemd/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-wei840222-treemd/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 1.0.2",
"description": "treemd 1.0.2 changelog: - Clarified skill usage by adding a mandatory \"Agent Command Gate,\" specifying that agent tasks must use non-interactive flags only, never launch the TUI or file picker. - Updated stdin section to limit examples/documentation to CLI (non-interactive) modes. - Relocated and condensed human-only TUI documentation outside the agent skill. - Removed the `skill-card.md` file. - Removed Openclaw-specific metadata from SKILL.md.",
"href": "https://clawhub.ai/wei840222/treemd",
"sourceUrl": "https://clawhub.ai/wei840222/treemd",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-08-15T14:14:24.752Z",
"isPublic": true
}
]
}Record generated Oct 11, 2026.
