Turn Feishu/Lark into an AI-readable development knowledge hub for Codex, Claude Code, Cursor, OpenClaw, Trae-style AI IDEs, and any agent that can load SKILL.md.
Use it to remember bug fixes, avoid repeated debugging, keep task state clear, write release evidence, and build a reusable engineering knowledge base on top of lark-cli / feishu-cli.
It is designed to bridge the last wall between AI coding tools and office knowledge work: your AI IDE/CLI fixes code, Dev Hub writes the evidence into Feishu/Lark, and future AI runs can search that memory before repeating the same debugging path. Start with manual commands, then add hooks, PR writeback, cron reports, and Whiteboard drafts when your workflow is ready.
- Let your AI IDE/CLI search old bug evidence before investigating a new failure.
- Build a repeatable bug location -> fix -> verification -> writeback loop.
- Avoid repeated debugging by turning pitfalls, root causes, and playbooks into searchable Feishu/Lark records.
- Keep tasks, blockers, release notes, and AI run evidence in the same workspace your team already uses.
- Make reports easier: daily notes, weekly summaries, bugfix briefs, and release updates can be generated from structured records instead of memory.
- Connect Codex, Claude Code, Cursor, Trae, OpenClaw, and custom agents to Feishu/Lark without forcing every automation to be configured on day one.
You do not need to set up full automation up front. The reliable baseline is manual command + receipt/outbox; local git hooks, GitHub Actions, cron reports, and Whiteboard workflows can be added gradually.
Also discoverable as: feishu-cli, 飞书 CLI, lark-cli, Lark CLI, Feishu Dev Hub, Lark Dev Hub, Feishu knowledge base, Lark knowledge base, Codex Feishu, and Claude Code Feishu.
- Searches old Tasks, Bugfixes, AI Runs, Releases, Decisions, Project Facts, Artifacts, Pitfalls, Playbooks, and Areas before a new bug investigation.
- Writes structured Bugfix and AI Run records after meaningful fixes.
- Writes Release records before pushing
mainormaster. - Keeps task state, next actions, blockers, and bug queues explicit.
- Creates complete Docs/Wiki templates for projects, bugfixes, playbooks, decisions, releases, AI runs, and investigation paths.
- Creates starter Whiteboards for the global knowledge model, the current project architecture, bug investigation, PR writeback, and task execution loops.
- Links long-form Docs/Wiki pages and Whiteboards back to searchable Base records.
- Separates project facts from personal agent memory so Codex, Claude Code, and other agents can share the same knowledge base.
- Provides a hook gate that warns when bugfix commits or main pushes lack knowledge writeback evidence.
| Skill | Use When |
|---|---|
lark-cli-devhub |
You want the full Dev Hub workflow: search before fixing, write after fixing, release evidence, and routing to domain skills. |
lark-cli-devhub-code-loop |
You want bug investigation, old-record search, Bugfix/AI Run writeback, and receipt/outbox discipline. |
lark-cli-devhub-report-loop |
You want daily, weekly, bugfix, release, or project report drafts from Dev Hub records. |
lark-cli-devhub-pr-writeback |
You want GitHub PR/CI events mapped to AI Runs, Decisions, Bugfix candidates, Tasks, or Releases. |
lark-cli-devhub-whiteboard-loop |
You want architecture, workflow, dependency, or bug investigation diagram drafts linked to Artifacts. |
lark-cli-devhub-base |
You want Feishu/Lark Base as the structured AI-readable database. |
lark-cli-devhub-docs-wiki |
You want Docs/Wiki pages for design notes, bug retrospectives, runbooks, and project pages. |
lark-cli-devhub-taskflow |
You want Feishu/Lark Tasks for bug queues, task lists, blockers, owners, and next actions. |
lark-cli-devhub-whiteboard |
You want Whiteboards for architecture maps, workflow maps, dependency maps, and knowledge graphs. |
lark-cli-devhub-drive |
You want Drive files, folders, imports, exports, sync, comments, permissions, and artifacts. |
lark-cli-devhub-sheets |
You want spreadsheet reports, QA matrices, release checklists, and human-editable trackers. |
lark-cli-devhub-calendar |
You want agendas, scheduling, freebusy, meeting rooms, release windows, and review blocks. |
lark-cli-devhub-communications |
You want IM/Mail search, summaries, drafts, replies, announcements, and artifact sharing. |
lark-cli-devhub-meetings |
You want VC/Minutes records, meeting notes, recordings, action items, and decision extraction. |
lark-cli-devhub-approvals-okr |
You want approvals, sign-offs, OKR progress, release governance, and goal evidence. |
lark-cli-devhub-slides |
You want briefings, release review decks, retrospectives, roadmap decks, and stakeholder updates. |
lark-cli-devhub-events |
You want event consumers, watchers, automation triggers, and writeback loops. |
This pack is plain SKILL.md plus helper scripts. It works best with tools that support Agent Skills or skill-like markdown instructions.
| Platform | Install Path |
|---|---|
| Codex | npx skills add afengzi/lark-cli-devhub-skills -g --agent codex --skill '*' |
| Claude Code | npx skills add afengzi/lark-cli-devhub-skills -g --agent claude-code --skill '*' |
| Cursor | npx skills add afengzi/lark-cli-devhub-skills -g --agent cursor --skill '*' |
| OpenClaw / ClawHub | npx -y clawhub@0.16.0 install lark-cli-devhub |
| Multiple Agent Skills hosts | npx skills add afengzi/lark-cli-devhub-skills -g --agent '*' --skill '*' |
| Trae, Windsurf, Continue, Aider, custom agents | Clone the repo and point the tool at skills/*/SKILL.md, or copy the skill folders into that tool's skill/rules/instructions directory. |
If your AI tool does not have first-class Agent Skills support yet, the fallback is still simple: copy the relevant skills/<name>/SKILL.md folder into the tool's custom instruction or skill directory.
Most users should start with the Agent Skills installer, not individual ClawHub commands. The installer can install the whole pack in one command, list available sub-skills, or install only the sub-skills you select.
Required for local helper scripts:
- Python 3.10+
gitlark-cliconfigured with Feishu/Lark app credentials and user auth
Required for one-command skill installation:
- Node.js 18+ with
npx
Optional, depending on the workflow you enable:
clawhubvianpx -y clawhub@0.16.0for ClawHub install/publish.ghor GitHub Actions for PR/CI writeback automation.cron, GitHub scheduled workflows, or another scheduler for daily/weekly report drafts.@larksuite/whiteboard-clifor Whiteboard rendering and architecture map workflows.- Feishu/Lark app scopes for Base, Docs/Wiki, Drive, Tasks, IM, Calendar, Sheets, Meetings, Approvals, or Whiteboard depending on the domain skills you use.
Preview available skills before installing:
npx skills add afengzi/lark-cli-devhub-skills --listInstall all skills from GitHub:
npx skills add afengzi/lark-cli-devhub-skills -g -yThis installs the full skill pack; you do not need to install every sub-skill one by one.
Install for all detected Agent Skills hosts:
npx skills add afengzi/lark-cli-devhub-skills -g --agent '*' --skill '*'Install selected skills when you want a smaller footprint:
npx skills add afengzi/lark-cli-devhub-skills -g -y -s lark-cli-devhub
npx skills add afengzi/lark-cli-devhub-skills -g -y -s lark-cli-devhub -s lark-cli-devhub-code-loop -s lark-cli-devhub-report-loopMany interactive shells can show prompts when you omit non-interactive flags such as -y. In non-interactive AI IDE/CLI sessions, use -s/--skill for explicit selection.
Install local helper scripts and templates:
git clone https://github.com/afengzi/lark-cli-devhub-skills.git
cd lark-cli-devhub-skills
./scripts/install-devhub.shThe helper installer defaults to all local skills, but it can also install a subset:
./scripts/install-devhub.sh --list-skills
./scripts/install-devhub.sh --skills core
./scripts/install-devhub.sh --skills workflow
./scripts/install-devhub.sh --skills lark-cli-devhub,lark-cli-devhub-code-loopIf an older non-symlink skill folder already exists and you intentionally want to replace it with this repo's latest skill files, add --force.
The helper installer also prints the recommended lark-cli auth setup commands after installation. Use --no-auth-guide only if your Feishu/Lark app is already authorized.
Dev Hub needs lark-cli authentication and Feishu/Lark app scopes before it can write Base, Docs/Wiki, Tasks, or other resources. Use the official lark-cli auth flow:
lark-cli doctor --offline
lark-cli auth status --verify
lark-cli auth login --domain base,wiki,docs --recommend
lark-cli auth scopes --format prettyFor extra workflows, request only the domains you enable:
lark-cli auth login --domain task,drive,im,calendar,sheets,minutes --recommendTo inspect exact scopes before requesting or checking them:
lark-cli schema <service.resource.method> --format pretty
lark-cli auth check --scope "<space-separated scopes>"For headless agent sessions, start device login and send the browser URL to the user:
lark-cli auth login --domain base,wiki,docs --recommend --no-wait --json
lark-cli auth login --device-code "<device_code>"ClawHub publishes one skill slug at a time. Use it when you want one specific skill from the ClawHub registry. Use npx skills add afengzi/lark-cli-devhub-skills -g -y when you want the full pack from GitHub.
Search:
npx -y clawhub@0.16.0 search feishu-cli
npx -y clawhub@0.16.0 search lark-cli-devhubInstall the main skill:
npx -y clawhub@0.16.0 install lark-cli-devhubInstall workflow skills:
npx -y clawhub@0.16.0 install lark-cli-devhub-code-loop
npx -y clawhub@0.16.0 install lark-cli-devhub-report-loop
npx -y clawhub@0.16.0 install lark-cli-devhub-pr-writeback
npx -y clawhub@0.16.0 install lark-cli-devhub-whiteboard-loopInstall optional domain skills:
npx -y clawhub@0.16.0 install lark-cli-devhub-base
npx -y clawhub@0.16.0 install lark-cli-devhub-docs-wiki
npx -y clawhub@0.16.0 install lark-cli-devhub-taskflow
npx -y clawhub@0.16.0 install lark-cli-devhub-whiteboard
npx -y clawhub@0.16.0 install lark-cli-devhub-drive
npx -y clawhub@0.16.0 install lark-cli-devhub-sheets
npx -y clawhub@0.16.0 install lark-cli-devhub-calendar
npx -y clawhub@0.16.0 install lark-cli-devhub-communications
npx -y clawhub@0.16.0 install lark-cli-devhub-meetings
npx -y clawhub@0.16.0 install lark-cli-devhub-approvals-okr
npx -y clawhub@0.16.0 install lark-cli-devhub-slides
npx -y clawhub@0.16.0 install lark-cli-devhub-eventsNote: npx skills find searches the Agent Skills / skills.sh index, not the ClawHub registry. Use npx skills add afengzi/lark-cli-devhub-skills -g -y for the full GitHub skill pack, or npx clawhub search/install for individual ClawHub skills.
lark-cliconfigured with Feishu/Lark app credentials.- User auth and app scopes for the Feishu/Lark resources you want to write.
- Python 3.10+ and
git. - Node.js 18+ with
npxif you install from GitHub/ClawHub using npm commands. - Optional:
ghor GitHub Actions for PR/CI writeback. - Optional: cron/scheduled workflows for daily, weekly, or monthly report drafts.
- Optional:
@larksuite/whiteboard-clifor Whiteboard rendering.
Minimum useful Feishu/Lark scopes are Docs/Wiki read-write plus Base record read-write. Add Drive, Task, IM, Calendar, Sheets, Meetings, Approvals, and Whiteboard scopes only when you enable those workflows.
Preflight:
python3 "$HOME/.codex/devhub/bin/devhub.py" preflightProvision Base tables, starter records, Wiki pages, starter artifacts, and starter Whiteboards:
export DEVHUB_HOME="$HOME/.codex/devhub"
python3 "$DEVHUB_HOME/bin/devhub.py" provision \
--schema "$DEVHUB_HOME/templates/base-schema.json" \
--seed "$DEVHUB_HOME/templates/seed.example.json" \
--views "$DEVHUB_HOME/templates/base-views.json"The generated config lives at:
$HOME/.codex/devhub/config.json
Project-local runtime files live at:
.devhub/receipts/
.devhub/outbox/
Provisioning creates complete starter content, not just empty folders:
- Wiki templates: project record, bugfix retro, playbook, decision, release writeback, AI run summary, and bug investigation path.
- Whiteboard maps: human-readable SVG visual maps under both global Maps and project Maps, including overview/architecture, bug investigation path, PR writeback flow, and task execution loop.
- Base
Artifactsrecords for every generated Doc or Whiteboard so future agents can find them through search before opening visual pages. - Base views that keep the default tables readable without adding many relation columns.
- Known provisioning noise such as
Untitledroot/global pages is archived under90 Archive/99 Provision Cleanup, not left in the main navigation.
Whiteboard input can be SVG, Mermaid, or raw OpenAPI JSON. The starter maps use SVG because it gives a readable mind-map style after conversion to native Feishu Whiteboard nodes. The helper caches SVG conversion output under $DEVHUB_HOME/cache/whiteboards/.
Base writes use the fastest safe path available: new Artifact rows are batch-created, existing rows are listed once and skipped when unchanged, and only changed existing rows are updated individually. This matches current lark-cli base behavior: +record-batch-create is row-specific, while +record-batch-update applies one shared patch to many rows.
Existing Whiteboards are preserved by default so rerunning provision does not overwrite human edits. To redraw starter maps from templates, run with:
DEVHUB_WHITEBOARD_OVERWRITE=1 python3 "$DEVHUB_HOME/bin/devhub.py" provision \
--schema "$DEVHUB_HOME/templates/base-schema.json" \
--seed "$DEVHUB_HOME/templates/seed.example.json" \
--views "$DEVHUB_HOME/templates/base-views.json"Search before fixing a bug:
python3 "$DEVHUB_HOME/bin/devhub.py" search \
--project "$(basename "$PWD")" \
--query "area symptom error keywords"Write bugfix evidence:
python3 "$DEVHUB_HOME/bin/devhub.py" record-bugfix --payload /tmp/devhub-bugfix.jsonWrite bugfix evidence plus a human-readable Wiki retro page:
python3 "$DEVHUB_HOME/bin/devhub.py" record-bugfix --payload /tmp/devhub-bugfix.json --wikiWrite AI run evidence:
python3 "$DEVHUB_HOME/bin/devhub.py" record-ai-run --payload /tmp/devhub-ai-run.jsonWrite release evidence:
python3 "$DEVHUB_HOME/bin/devhub.py" record-release --payload /tmp/devhub-release.jsonUse --wiki for long-form records that should be readable in Wiki/Docs, not only searchable in Base:
python3 "$DEVHUB_HOME/bin/devhub.py" record-release --payload /tmp/devhub-release.json --wiki
python3 "$DEVHUB_HOME/bin/devhub.py" record-decision --payload /tmp/devhub-decision.json --wiki
python3 "$DEVHUB_HOME/bin/devhub.py" record-ai-run --payload /tmp/devhub-ai-run.json --wiki--wiki first writes the Base row, then appends a timestamped section directly into the numbered project Wiki page such as 00 Overview, 20 Bugfix Retros, 40 Decisions, or 60 Reports, and registers that page in Base Artifacts. If Wiki writing fails, the Base row is kept and a wiki outbox item is left for retry.
Wiki writes are incremental by default: the numbered page is stable, while each appended section starts with local write time and includes the source record id when available, for example 2026-05-20 19:58:12 - AI Run: Fix stream (recxxxx). The command output includes wiki.path, wiki.entry_title, and wiki.mode=append so humans can find the page and the exact appended section.
Write a report draft into Wiki:
python3 "$DEVHUB_HOME/bin/devhub.py" report-draft \
--kind weekly \
--project "$(basename "$PWD")" \
--records /tmp/devhub-report-records.json \
--wikiWrite task, decision, artifact, or project fact evidence:
python3 "$DEVHUB_HOME/bin/devhub.py" record-task --payload /tmp/devhub-task.json
python3 "$DEVHUB_HOME/bin/devhub.py" record-decision --payload /tmp/devhub-decision.json
python3 "$DEVHUB_HOME/bin/devhub.py" record-artifact --payload /tmp/devhub-artifact.json
python3 "$DEVHUB_HOME/bin/devhub.py" record-project-fact --payload /tmp/devhub-project-fact.jsonSearch scope note: full project-history recall should cover Tasks, Bugfixes, AI Runs, Releases, Decisions, Project Facts, Record Relations, Artifacts, Pitfalls, Playbooks, and Areas. The helper reports its coverage so agents do not overclaim what they checked.
Template discipline: when the Dev Hub skills are active, agents must check the matching Wiki template or local template before writing Bugfix, AI Run, Release, Decision, Artifact, or Project Fact records. If the template cannot be read, the writeback should say that explicitly in the AI Run or outbox instead of silently producing a thin record.
Map discipline: architecture, module boundary, PR/writeback flow, task flow, or reusable bug investigation path changes should update the matching project map under 10 Projects/<project>/50 Maps. Reusable cross-project changes should also update the global map under 00 Global/50 Maps.
The pack is useful without installing every automation. Add these layers gradually:
| Layer | What It Adds | Safe Default |
|---|---|---|
| Manual commands | Search, bugfix writeback, AI run evidence, release records. | Always available; every write creates receipt or outbox evidence. |
| Local git hook | Reminds you to write knowledge evidence before bugfix commits or main pushes. | Shadow Mode warnings before enforcement. |
| PR writeback | PR created/updated writes AI Runs, reviews write Decisions/Bugfixes, merges write Releases, CI failures write task/bug candidates. | A PR event is only a trigger; success requires a receipt. |
| Cron reports | Daily, weekly, monthly, and release report drafts from Base records. | Draft first; publish only after explicit approval. |
| Whiteboard workflow | Architecture maps, dependency maps, and bug investigation diagrams. | Dry-run or draft first; link final boards back to Base Artifacts. |
The default gate is Shadow Mode. It warns when a bugfix commit or main push lacks knowledge writeback evidence.
Accepted evidence:
# kb-updated.devhub/receipts/*.json.devhub/outbox/*.json# kb-skip: reason
Script:
$HOME/.codex/devhub/bin/kb-gate.shBase is the structured source of truth. Docs/Wiki and Whiteboards are linked artifacts.
Wiki is project-scoped by default:
Dev Knowledge Hub
00 Global
50 Maps
10 Projects
<project>
00 Overview
20 Bugfix Retros
30 Playbooks
40 Decisions
50 Maps
60 Reports
90 Archive
Base is intentionally lightweight:
- Business tables keep searchable text fields and evidence fields. They do not keep
Related ...columns by default, whether text or link/relation fields. - URL-like fields such as
Source URL,Repo URL,Wiki URL, andFeishu Task URLare Feishu Base text fields with URL style, so humans can click them while agents still write simple strings. Record Relationsis the AI-readable graph edge table. Agents may use temporary payload hints such asRelation Hints: Tasks: Fix login; the helper strips those hints from the business table write and stores the edge inRecord Relations.- Views from
base-views.jsonkeep human browsing comfortable: tasks and triage use kanban, reusable knowledge and artifacts use gallery, dated work uses calendar/gantt, and exact edge inspection keeps a grid fallback. - Feishu Base relation fields are still supported for advanced custom schemas: 单向关联 uses official
type: 18, 双向关联 uses officialtype: 21, and lark-cli shortcut payloads usetype: "link"withlink_table. They are not part of the default lightweight schema; do not convert existing textRelated ...fields in place.
What is automatic:
provisioncreates or reuses the Wiki tree, Base tables/fields, views, seed records, and starter Artifacts for Docs/Whiteboards.record-*commands write Base records, strip relation hints intoRecord Relations, and create receipts or outbox items.record-bugfix,record-pitfall,record-playbook,record-ai-run,record-release,record-decision, andrecord-project-factcan also append timestamped long-form sections directly to numbered pages when passed--wiki; those pages are indexed through BaseArtifacts.report-draft --wikiappends a timestamped daily, weekly, or release report section directly into the project60 Reportspage, using local Markdown template files for AI guidance before indexing it in BaseArtifacts.- Existing Base fields are not force-converted across unsafe types; safe display-style updates such as text URL style and datetime format are reconciled during provisioning.
What remains a skill workflow:
- Before coding, the agent should search/pick/create a native Feishu Task when the work is worth tracking, then mirror it into Base
Tasks. - A normal Base record write without
--wikidoes not create or append Wiki content by itself. Use--wikifor durable bug retros, release notes, decisions, major AI runs, or current project facts that humans should read later. Each--wikiwrite appends a new timestamped section into the existing numbered page instead of overwriting older content or creating another child page. - Views update when provisioning or the view helper is run, not on every record write.
For existing Bases created by older versions, remove deprecated Project Relation / Area Relation and all business-table Related ... columns after review:
python3 "$DEVHUB_HOME/bin/devhub.py" cleanup-relation-fields --dry-run
python3 "$DEVHUB_HOME/bin/devhub.py" cleanup-relation-fieldsTasks also have two layers:
- Feishu/Lark Tasks are the native execution/reminder module.
- Base
Tasksis the AI-readable task index and history anchor. It storesFeishu Task URL,Feishu Task GUID, status, blocker, next action, and links to Bugfix/Release/AI Run records.
| Table | Purpose |
|---|---|
Projects |
Repository identity, current focus, default branch, Wiki URL. |
Areas |
Product or code areas, paths, risk, and ownership. |
Tasks |
Searchable task index: current work, priority, blockers, next action, native task URL/GUID, and graph edges. |
Bugfixes |
Symptom, evidence, root cause, fix summary, changed files, verification, regression risk. |
Pitfalls |
Reusable traps and "check this first" notes. |
Playbooks |
Diagnosis order, commands, success criteria, and forbidden actions. |
Decisions |
Architecture/product decisions, alternatives, consequences, review triggers. |
Project Facts |
Current implementation truths, retired paths, invariants, source, and review triggers. |
Record Relations |
Lightweight AI graph edges between records. |
Releases |
Branch, commit SHA, verification, rollback notes, and release graph edges. |
Artifacts |
Linked Docs, Whiteboards, dashboards, files, and summaries. |
AI Runs |
Agent task intent, actions taken, evidence checked, files changed, verification result. |
skills/
lark-cli-devhub/
lark-cli-devhub-code-loop/
lark-cli-devhub-report-loop/
lark-cli-devhub-pr-writeback/
lark-cli-devhub-whiteboard-loop/
lark-cli-devhub-base/
lark-cli-devhub-docs-wiki/
lark-cli-devhub-taskflow/
lark-cli-devhub-whiteboard/
lark-cli-devhub-drive/
lark-cli-devhub-sheets/
lark-cli-devhub-calendar/
lark-cli-devhub-communications/
lark-cli-devhub-meetings/
lark-cli-devhub-approvals-okr/
lark-cli-devhub-slides/
lark-cli-devhub-events/
scripts/
devhub.py
devhub_lib/
kb-gate.sh
install-devhub.sh
templates/
base-schema.json
base-views.json
seed.example.json
config.example.json
wiki/
whiteboards/
report-daily.md
report-weekly.md
report-release.md
whiteboard-draft.md
github-pr-writeback.yml
cron-report.yml
docs/
architecture.md
base-field-types.md
lark-cli-capability-map.md
marketplaces.md
- Do not write secrets, access tokens, app secrets, private keys, raw credentials, or full environment files into Feishu.
- Git hooks check for receipts or outbox items; they do not perform complex network writes.
- Whiteboard is a visual aid, not the only source of truth. Always pair durable maps with Base
Artifactsrecords. - Agent memory should store collaboration preferences. Dev Hub should store project facts and engineering evidence.
Use these keywords when searching or linking this project:
- English:
feishu-cli,lark-cli,Feishu CLI,Lark CLI,Feishu Dev Hub,Lark Dev Hub,AI knowledge base,developer knowledge base,bugfix memory,release evidence,Claude Code Feishu,Codex Feishu - Chinese:
飞书 CLI,飞书知识库,飞书多维表格,飞书任务,飞书画板,AI 项目知识库,bug 复盘,踩坑记录,发布证据
MIT. See LICENSE.