senrecep/tsentials/tsentials-tree

Claude Code and agent skill by senrecep/tsentials

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Install

npx vskill@latest install senrecep/tsentials/tsentials-tree

SKILL.md

tsentials/tree — Skill

Use when modelling recursive hierarchies: categories, comments, org charts.

API

typescript
import { Tree } from 'tsentials/tree';
import type { Tree as TreeType } from 'tsentials/tree'; // interface: { value: T; forest: ReadonlyArray<Tree<T>> }
// Construction
const t = Tree.of('root', [
Tree.of('a', [Tree.leaf('a1')]),
Tree.leaf('b'),
]);
// Query
Tree.root(t); // 'root' — get root value
Tree.children(t); // immediate child Tree nodes
Tree.size(t); // total nodes
Tree.isLeaf(t); // has no children?
Tree.find(t, v => v === 'a1');
Tree.findAll(t, v => v.startsWith('a'));
// Transform
Tree.map(t, v => v.toUpperCase());
Tree.filter(t, v => v !== 'b');
Tree.toArray(t); // pre-order flatten
Tree.toArrayWithDepth(t); // [{ value: 'root', depth: 0 }, { value: 'a', depth: 1 }, ...]
// Fold
Tree.fold(t, (value, children) => value + children.reduce((a, b) => a + b, 0));
// Pretty print
Tree.drawTree(t); // uses String() by default
Tree.drawTree(t, v => v.toUpperCase()); // custom show function

Patterns

  • Use Tree for any nested structure where parent-child relationships matter.
  • Use fold for recursive aggregation (sums, validation, rendering).

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/senrecep/tsentials/tsentials-tree/badge)](https://verified-skill.com/skills/senrecep/tsentials/tsentials-tree)

Something wrong with this skill or its page? Tell us.