Skip to content

fix(skills): add single entry skill#1432

Closed
xu91102 wants to merge 1 commit into
larksuite:mainfrom
xu91102:fix/skills-index-slim
Closed

fix(skills): add single entry skill#1432
xu91102 wants to merge 1 commit into
larksuite:mainfrom
xu91102:fix/skills-index-slim

Conversation

@xu91102

@xu91102 xu91102 commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Background

Fixes #1385.

The repository currently exposes every skills/lark-* domain skill by default. In skill pickers/search UIs this floods the global skill list with Lark-specific entries and long domain descriptions, especially for large domains such as IM.

Changes

  • Add a root lark-suite SKILL.md as the default single entry skill.
  • Keep domain-specific guidance in the existing embedded skills/lark-* docs and route agents to them through lark-cli skills read <domain-skill> only when needed.
  • Update README / root help to describe the default single entry skill and document --full-depth for users who still want direct nested domain skill discovery.
  • Extend the skill format checker and workflow so the root SKILL.md is validated alongside skills/.

Verification

  • npx -y skills add . --list --json: passed — reports Found 1 skill and lists lark-suite.
  • npx -y skills add . --list --full-depth --json: passed — nested domain skills such as lark-im and lark-calendar remain discoverable when explicitly requested.
  • npx -y skills use . --skill lark-suite: passed — renders the new entry skill.
  • bash scripts/skill-format-check/test.sh: passed.
  • node scripts/skill-format-check/index.js .: passed.
  • node scripts/skill-format-check/index.js skills: passed.
  • go test -count=1 -timeout=3m ./cmd/skill ./internal/skillscheck ./cmd/update: passed.
  • gofmt -l cmd/root.go internal/skillscheck/sync.go cmd/update/update.go: no output.
  • git diff --check origin/main...HEAD: passed.

Risk and rollback

Default npx skills add larksuite/cli now installs the single entry skill instead of every nested domain skill. This intentionally reduces global skill-list noise. Existing domain skills remain in the repository and can still be discovered with --full-depth or read via lark-cli skills read. Rollback is reverting this PR.

Summary by CodeRabbit

  • Documentation
    • Added SKILL.md documentation with skill metadata and command guidance.
    • Updated README and Chinese README to reflect simplified skill model with single default entry.
    • Enhanced CLI help text with updated installation and discovery instructions.

@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Introduces a single root-level lark-suite skill entry point that routes to domain-specific documentation, updates the skill validation workflow and script to support root SKILL.md files, adds corresponding test coverage, and revises user-facing documentation and CLI help to reflect the new model.

Changes

Root-Level Umbrella Skill Model

Layer / File(s) Summary
Root skill definition and domain routing
SKILL.md
Defines the lark-suite umbrella skill with YAML metadata, domain routing table mapping user intents to domain-specific skills, and command exploration guidance encouraging documented shortcuts over raw schema/OpenAPI.
Skill validation infrastructure and tests
.github/workflows/skill-format-check.yml, scripts/skill-format-check/index.js, scripts/skill-format-check/README.md, scripts/skill-format-check/test.sh, scripts/skill-format-check/tests/good-root-skill/SKILL.md
Workflow now triggers on root SKILL.md changes and runs validation on both repository root and skills directory. Validation script enumerates only subdirectories containing SKILL.md and treats root as a special entry when SKILL.md exists. Test suite includes new good-root-skill fixture validating root skill format. Documentation clarifies the expanded validation scope and provides manual invocation examples.
User documentation updates
README.md, README.zh.md
Both English and Chinese READMEs updated to emphasize the single default lark-suite entry skill with embedded domain documentation. Installation headings specify "default CLI skill." Feature bullets revised to describe on-demand embedded guidance. "Agent Skills" sections replaced with narratives showing example skills read commands and documenting the opt-in --full-depth path for nested skill discovery.
CLI help text alignment
cmd/root.go
Root help text updated to guide users toward installing the default single-entry skill via npx skills add larksuite/cli and documents advanced commands for legacy domain skills using --full-depth with specific -s values.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

Possibly related PRs

  • larksuite/cli#148 — Both PRs extend the skill-format-check workflow and validation script, with this PR building on prior SKILL.md validation infrastructure.
  • larksuite/cli#691 — Both PRs update README "Why lark-cli?" feature bullets and the "Agent Skills" section to reflect changes in the skill/domain model.
  • larksuite/cli#289 — Both PRs modify the rootLong "AI AGENT SKILLS" help text in cmd/root.go to update installation guidance and skill discovery wording.

Suggested labels

size/L, feature

Suggested reviewers

  • MaxHuang22
  • liangshuo-1
  • fangshuyu-768

Poem

🐰 A skill so fine, now bundled as one,
Where domains dance together for everyone.
Root to the leaf, a pathway so clear,
lark-suite routes all the wisdom near!
The format checker now greets what's been born—
A fresh single entry, gloriously sworn! 🌟

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix(skills): add single entry skill' accurately describes the main change: adding a root SKILL.md to create a single entry point for Lark skills instead of exposing multiple domain skills by default.
Description check ✅ Passed The description follows the template with Background, Changes, Verification, and Risk sections. It clearly explains the motivation (fixing issue #1385), implementation details, and comprehensive verification steps.
Linked Issues check ✅ Passed The PR fully addresses issue #1385 by implementing a single entry skill (lark-suite) to reduce skill list pollution, preserving domain documentation, and maintaining discoverability via --full-depth or skills read commands.
Out of Scope Changes check ✅ Passed All changes directly support the core objective: adding root SKILL.md, updating documentation/help text, extending skill format checker validation, and adding test fixtures. No extraneous changes detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added the size/L Large or sensitive change across domains or core paths label Jun 12, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@SKILL.md`:
- Around line 1-13: The root SKILL.md (skill name: lark-suite) isn't included by
the current embed whitelist which only matches skills/*/SKILL.md, so the
lark-suite entry skill won't be embedded; update the embed whitelist/pattern to
also include the repository-root SKILL.md (or add a pattern like SKILL.md at
root) so the "lark-suite" skill is packaged, or explicitly confirm in config
that root SKILL.md should remain source-only. Target the embed whitelist/config
entry that defines the included paths/patterns and add a rule to include the
root SKILL.md.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8d528af1-e25b-4bc6-b210-b85005590ab8

📥 Commits

Reviewing files that changed from the base of the PR and between 2a7e9c7 and 911a5c7.

📒 Files selected for processing (9)
  • .github/workflows/skill-format-check.yml
  • README.md
  • README.zh.md
  • SKILL.md
  • cmd/root.go
  • scripts/skill-format-check/README.md
  • scripts/skill-format-check/index.js
  • scripts/skill-format-check/test.sh
  • scripts/skill-format-check/tests/good-root-skill/SKILL.md

Comment thread SKILL.md
Comment on lines +1 to +13
---
name: lark-suite
version: 1.0.0
description: "Use lark-cli to operate Lark/Feishu across messaging, docs, drive, sheets, base, calendar, mail, tasks, wiki, meetings, approvals, events, and more. This is the single entry skill; load domain docs only when needed."
metadata:
requires:
bins: ["lark-cli"]
cliHelp: "lark-cli --help"
---

# Lark/Feishu CLI

Use `lark-cli` to operate Lark/Feishu resources. This skill is the default entry point and keeps the installed skill list small. Domain-specific details remain available on demand through the CLI-embedded skill content, so agents should load only the domain they need for the current user request.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Root skill needs to be shipped with the embedded skill set.

The current embed path still only includes skills/*/SKILL.md, so this repo-root SKILL.md will be invisible to the built CLI. If lark-suite is meant to be the default entry skill, please extend the embed whitelist or confirm this file is intentionally source-only.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@SKILL.md` around lines 1 - 13, The root SKILL.md (skill name: lark-suite)
isn't included by the current embed whitelist which only matches
skills/*/SKILL.md, so the lark-suite entry skill won't be embedded; update the
embed whitelist/pattern to also include the repository-root SKILL.md (or add a
pattern like SKILL.md at root) so the "lark-suite" skill is packaged, or
explicitly confirm in config that root SKILL.md should remain source-only.
Target the embed whitelist/config entry that defines the included paths/patterns
and add a rule to include the root SKILL.md.

@MaxHuang22

Copy link
Copy Markdown
Collaborator

Thanks for this PR — it's definitely aimed at the right problem (#1385 / #1392). After evaluating it, though, it diverges from the direction we're driving on a few key points, so I'm closing it with an explanation:

  1. Default behavior. This PR flips the default to a single entry (only lark-suite is installed by default; domain skills fall back to --full-depth). Our direction is to keep the separate domain skills as the default, with the umbrella as an opt-in mode and the user's choice remembered — not to flip the default for everyone.

  2. Primary source. The single-entry behavior relies on a root SKILL.md short-circuiting the local directory scan, but the primary install source open.feishu.cn is index-driven, and that path isn't verified here — on the real install flow it most likely won't take effect.

  3. Existing users. skills add only adds, never removes, so users who already installed the domain skills would end up with both side by side, with no reduction in context.

Your work on the root SKILL.md routing and the format-check extension is valuable, and we'll draw on it as we build out the opt-in umbrella mode. We're tracking progress in #1392 — please feel free to keep the conversation going there. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L Large or sensitive change across domains or core paths

Projects

None yet

Development

Successfully merging this pull request may close these issues.

就不能做成一个技能吗?找其他技能的时候,列表都被lark污染了!

2 participants