Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计异常

pytidbpytidb 搜索

Agent Skill

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

总安装

494

周安装

21

GitHub Stars

24

下载量

173
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/pingcap/agent-rules --skill pytidb

简介

用于查找、检索和筛选相关信息,支持关键词或任务场景快速定位结果。

  • 适合在需要根据来源线索定位候选结果时使用,如研究或开发场景。
  • 可结合来源仓库和原始 README 核验具体用法,确保功能匹配需求。
  • 安装方式:通过 npx skills add 从指定 GitHub 仓库添加。
  • 安装前建议确认权限范围和是否会触发联网或文件读写操作。

SKILL.md

PyTiDB (pytidb)

Use this skill to connect to TiDB from Python via pytidb, define tables, and build search / AI features on top.

When to Use This Skill

  • You want a Python ORM-like experience on TiDB via pytidb (built on SQLAlchemy).
  • You want vector search / full-text search / hybrid search on TiDB with high-level APIs.
  • You want runnable starter templates (scripts + small examples) you can adapt.

Need to provision a TiDB Cloud cluster first? Use tidbx (TiDB X) for cluster lifecycle guidance.

Code Generation Rules (Python)

  • Never hardcode credentials; use env vars (.env) and document required variables.
  • Prefer python -m venv.venv and pinned deps for reproducibility.
  • When editing requirements.txt, do not invent pytidb versions, use an unpinned pytidb by default unless the user explicitly requests it and the version has been verified to exist.
  • Keep examples minimal and runnable; avoid framework-specific assumptions unless the user asks.
  • Use parameterized SQL for any dynamic value (SQL injection safety).
  • For interactive environments, avoid “table already defined” errors (use extend_existing / open_table / if rows()==0 patterns).

Available Guides

Each guide is a self-contained walkthrough with a checklist and phases:

  • guides/quickstart.md — one-file “connect → create table → insert → vector search”
  • guides/search.md — vector / full-text / hybrid: when to use which, plus gotchas
  • guides/demos.md — examples playbook (vector/hybrid/image)
  • guides/agent-apps.md — agent-ish examples (RAG / memory / text2sql)
  • guides/troubleshooting.md — connection, TLS, embedding, and index/search issues
  • guides/custom-embedding.md — implement a custom embedding function (example: BGE-M3)

I’ll infer your intent (CRUD vs search vs “agent app”), then point you to the smallest guide and template set that gets you running.

Templates & Scripts

Each template is a complete file you can copy into your project. Choose the smallest one that matches your goal.

Core usage

  • templates/quickstart.py — minimal end-to-end: connect → create table → insert → vector search
  • templates/crud.py — basic table modeling + CRUD lifecycle (create/truncate/insert/query/update/delete)
  • templates/auto_embedding.py — auto embedding with pluggable providers (env-driven)
  • templates/vector_search.py — vector search example (optional metadata filter + threshold)
  • templates/hybrid_search.py — hybrid search example (FullTextField + vector field) with fused scoring

Image search

  • templates/image_search.py — image-to-image or text-to-image search (requires multimodal embedding + Pillow)
  • templates/image_search_data_loader.py — loads Oxford Pets dataset into TiDB (used by image_search.py)

Custom embeddings

  • templates/custom_embedding_function.py — example BaseEmbeddingFunction implementation (BGE-M3 via FlagEmbedding)
  • templates/custom_embedding.py — uses the custom embedder with auto embedding + vector search

Agent-ish examples

  • templates/rag.py — minimal RAG: retrieve via vector search, then generate via local LLM (Ollama via LiteLLM)
  • templates/memory_lib.py — reusable “memory” library (extract facts → store → retrieve)
  • templates/memory.py — CLI memory chat example using memory_lib.py
  • templates/text2sql.py — interactive Text2SQL (generates SQL via OpenAI; asks before executing)

Scripts

  • scripts/validate_connection.py — quick connection + SELECT 1 smoke test (supports params or DATABASE_URL)

Related Skills

  • tidbx — provision/manage TiDB Cloud (TiDB X) clusters

Workflow

I will:

  1. Confirm your TiDB deployment (Cloud Starter vs self-managed) and how you want to connect (params vs DATABASE_URL).
  2. Help you set env vars, validate the connection, and choose the right path:

- CRUD/table modeling - vector/full-text/hybrid search (and embedding provider) - example templates

  1. Generate the minimal set of files and commands to get you running.

适合场景

01

文本生成图片

02

图片风格化

03

产品图和创意图

04

需要 FLUX 模型时

能力概览

能力 1

调用 FLUX 图像模型

能力 2

支持文本生图和图像改写

能力 3

覆盖 LoRA 或风格适配

能力 4

适合创意视觉生成

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

平台分布

Codex

33.1%
按下载量换算57

Claude

31.04%
按下载量换算54

Cursor

20.64%
按下载量换算36

Gemini CLI

10.08%
按下载量换算17

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

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

来源信息

继续浏览同类 Skills