Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计提醒

thinkwellthinkwell 搜索

Agent Skill

thinkwell 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

285

周安装

12

GitHub Stars

11

下载量

186
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:thinkwell(thinkwell 搜索)
来源仓库:https://github.com/dherman/thinkwell
仓库路径:skills/thinkwell
安装命令:
npx skills add https://github.com/dherman/thinkwell --skill thinkwell
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/dherman/thinkwell --skill thinkwell

简介

thinkwell 搜索用于查找、检索和筛选相关信息。

  • 适合在 Codex、Claude、Cursor 等宿主中根据关键词快速定位结果。
  • 通过 npx 安装并指定技能,可结合来源仓库继续核验具体用法。
  • 使用前需确认权限范围、维护状态及是否涉及网络或文件操作。
  • thinkwell 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Thinkwell

Thinkwell is a TypeScript framework for blending deterministic code with LLM-powered reasoning. It provides a fluent Plan API for composing prompts, attaching tools, and getting structured JSON responses.

For detailed API signatures, see references/api-reference.md. For @JSONSchema details, see references/schema-guide.md. For complete working examples, see references/examples.md.

Core Concepts

1. The @JSONSchema Pattern

Annotate an interface with @JSONSchema in a JSDoc comment. Thinkwell auto-generates a TypeName.Schema namespace that provides the JSON schema at runtime:

/**
 * A summary of content.
 * @JSONSchema
 */
export interface Summary {
  /** A brief title */
  title: string;
  /** Key points from the content */
  points: string[];
  /**
   * Word count of the original
   * @minimum 0
   */
  wordCount: number;
}

// Summary.Schema is auto-generated — use it with agent.think()

Works with interfaces, type aliases, enums, and classes. JSDoc comments on properties become descriptions in the generated schema. Annotations like @minimum, @maximum, @minLength, @maxLength, @pattern, and @format map to JSON Schema validation keywords.

2. Agent Lifecycle

import { open } from "thinkwell";

const agent = await open('claude');  // Or: 'codex', 'gemini', 'kiro', 'opencode', 'auggie'
try {
  const result = await agent
    .think(Summary.Schema)           // Start builder with output schema
    .text("Summarize this:")         // Add prompt text
    .quote(content)                  // Add quoted content
    .run();                          // Execute → returns typed Summary
  console.log(result.title);
} finally {
  agent.close();                     // Always close when done
}

The pattern is always: open → think → plan → run → close.

3. Plan Fluent API

agent.think(schema) returns a Plan. Chain methods to compose the prompt, then call .run() or .stream():

Content methods:

  • .text(content) — Add literal text
  • .textln(content) — Add text with trailing newline
  • .quote(content, label?) — Add content in XML-style tags (e.g., <feedback>...</feedback>)
  • .code(content, language?) — Add content as a fenced code block

Tool methods:

  • .tool(name, description, handler) — Register a tool (no input schema)
  • .tool(name, description, inputSchema, handler) — Register a tool with typed input
  • .tool(name, description, inputSchema, outputSchema, handler) — Full form with both schemas
  • .defineTool(...) — Same overloads, but hidden from the prompt text

Skill methods:

  • .skill(path) — Attach a stored skill from a SKILL.md directory
  • .skill({name, description, body, tools?}) — Attach a virtual skill

Configuration:

  • .cwd(path) — Set the working directory for the session

Execution:

  • .run() — Execute and return the typed result
  • .stream() — Execute and return a ThoughtStream for streaming events + result

4. Tools

Tools let the agent call back into your code. Three overloads:

Simple tool (no input schema):

.tool(
  "current_time",
  "Returns the current date and time.",
  async () => ({
    time: new Date().toLocaleTimeString(),
    date: new Date().toLocaleDateString(),
    timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
  })
)

Tool with typed input:

/** @JSONSchema */
interface SearchInput {
  /** Glob pattern to match files */
  pattern: string;
  /** Maximum results to return */
  limit?: number;
}

.tool(
  "search_files",
  "Search for files matching a glob pattern.",
  SearchInput.Schema,
  async (input) => {
    // input is typed as SearchInput
    const files = await glob(input.pattern);
    return { files: files.slice(0, input.limit ?? 10) };
  }
)

5. Thought Streaming

Use .stream() instead of .run() to get real-time events:

const stream = agent
  .think(Schema)
  .text("Analyze this codebase")
  .stream();

for await (const event of stream) {
  switch (event.type) {
    case "thought":    // Agent's internal reasoning
      process.stderr.write(event.text);
      break;
    case "message":    // Agent's visible response
      process.stdout.write(event.text);
      break;
    case "tool_start": // Tool invocation started
      console.log(`Using tool: ${event.title}`);
      break;
    case "tool_done":  // Tool completed
      break;
    case "plan":       // Agent's execution plan
      for (const entry of event.entries) {
        console.log(`[${entry.status}] ${entry.content}`);
      }
      break;
  }
}

const result = await stream.result;  // Final typed result

The stream and result promise are independent — you can iterate events, await the result, or both.

6. Sessions (Multi-Turn)

For conversations where the agent needs to remember context across calls:

const session = await agent.createSession({ cwd: "/my/project" });

const analysis = await session
  .think(AnalysisSchema)
  .text("Analyze this codebase")
  .run();

// Same session — agent remembers the analysis
const fixes = await session
  .think(FixesSchema)
  .text("Suggest fixes for the top issues")
  .run();

session.close();

Each agent.think() creates an ephemeral session. Use agent.createSession() when you need multi-turn context.

7. Skills

Attach reusable instruction packages to a prompt:

Stored skill (from filesystem):

.skill("./skills/code-review")

Virtual skill (programmatic):

.skill({
  name: "test-writer",
  description: "Generates unit tests for TypeScript functions.",
  body: `
# Test Writer

## Steps
1. Analyze function signatures
2. Generate test cases covering edge cases
3. Use the \`count-assertions\` tool to verify coverage

## Available Tools

### count-assertions
Count assertions in a test file.
Input: \`{ "path": "string" }\`
  `,
  tools: [{
    name: "count-assertions",
    description: "Count assertions in a test file",
    handler: async ({ path }) => {
      const content = await fs.readFile(path, "utf-8");
      const matches = content.match(/expect\(/g) || [];
      return { count: matches.length };
    },
  }],
})

CLI Usage

Running Scripts

# Run a script directly
thinkwell script.ts

# Or use a shebang
#!/usr/bin/env thinkwell

Scripts use standard npm imports (import {open} from "thinkwell").

IDE Support

Generate declaration files for TypeName.Schema autocomplete:

thinkwell types          # One-time generation
thinkwell types --watch  # Watch mode for development

Add *.thinkwell.d.ts to your tsconfig's include array and .gitignore.

Alternatively, install the Thinkwell VSCode extension for automatic IDE support without generating files.

Type Checking

thinkwell check          # Type-check the project (supports @JSONSchema)

Recommended Method Chain Order

const result = await agent
  .think(OutputSchema)               // 1. Schema (always first) → returns Plan
  .cwd("/my/project")                // 2. Configuration
  .skill("./skills/code-review")     // 3. Skills
  .text("Analyze this code:")        // 4. Prompt content
  .code(sourceCode, "typescript")
  .tool("helper", "...", handler)    // 5. Tools
  .run();                            // 6. Execute (always last)

Common Patterns

Prompt-Only (No Tools)

const summary = await agent
  .think(Summary.Schema)
  .text("Summarize the following content:")
  .quote(content)
  .run();

Tool + Streaming

const stream = agent
  .think(Greeting.Schema)
  .text("Create a time-appropriate greeting")
  .tool("current_time", "Get current time", async () => new Date())
  .stream();

for await (const event of stream) {
  if (event.type === 'message') process.stdout.write(event.text);
}
const greeting = await stream.result;

Custom Agent Command

const agent = await open({ cmd: 'my-custom-agent --acp' });

Environment Variable Override

# Override the agent for all scripts
THINKWELL_AGENT=gemini thinkwell script.ts

# Override with a custom command
THINKWELL_AGENT_CMD="my-agent --acp" thinkwell script.ts

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.19%
按下载量换算67

Claude

28.88%
按下载量换算54

Cursor

19.37%
按下载量换算36

Gemini CLI

10.16%
按下载量换算19

安全审计

Gen Agent Trust Hub

通过

Socket

可疑

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills