Skip to content

docs: clarify block anchor links in lark-doc skill - #1120

Merged
fangshuyu-768 merged 1 commit into
mainfrom
fix/doc-skill-anchor-url-guidance
May 27, 2026
Merged

docs: clarify block anchor links in lark-doc skill#1120
fangshuyu-768 merged 1 commit into
mainfrom
fix/doc-skill-anchor-url-guidance

Conversation

@fangshuyu-768

@fangshuyu-768 fangshuyu-768 commented May 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR clarifies one focused piece of guidance in the lark-doc skill: when a user asks for a direct link to a specific block, the agent should return document_base_url#block_id.

What changed

  • add a quick decision rule in skills/lark-doc/SKILL.md for returning 文档基础 URL#block_id
  • add a minimal example showing how to assemble a block direct link
  • clarify in skills/lark-doc/references/lark-doc-fetch.md that --detail with-ids can provide the block_id needed to build that link

Why

The intent is only to teach the agent how to form a direct block link. This PR does not expand anchor handling into broader document fetch or update workflows.

@github-actions github-actions Bot added domain/ccm PR touches the ccm domain size/M Single-domain feat or fix with limited business impact labels May 27, 2026
@coderabbitai

coderabbitai Bot commented May 27, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR updates lark-doc docs: SKILL.md now requires returning block direct links as 文档基础 URL#block_id and adds a quick-decision to fetch missing block IDs via docs +fetch --detail with-ids; command references clarify with-ids returns block IDs usable as URL fragments.

Changes

URL Anchor Block ID Usage Documentation

Layer / File(s) Summary
SKILL description and quick-decision rule
skills/lark-doc/SKILL.md
Top-level description now documents appending #<block_id> to Feishu Doc URLs for direct block anchors. Quick-decision: when asked for a block direct link, return 文档基础 URL#block_id; if only doc URL is available, call docs +fetch --detail with-ids to obtain the block_id.
Command reference clarification
skills/lark-doc/references/lark-doc-fetch.md, skills/lark-doc/references/lark-doc-create.md
docs +fetch --detail=with-ids row clarified that returned content includes block IDs which can be used for +update --block-id and for forming 文档URL#block_id anchor links. The create reference contains an empty/placeholder hunk with no visible textual changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • larksuite/cli#981: Both PRs update docs guidance around using docs +fetch --detail with-ids to obtain block_id for direct block links.
  • larksuite/cli#891: Overlaps on clarifications for docs +fetch --detail with-ids and block-ID usage in doc operations.

Suggested reviewers

  • wittam-01

Poem

🐰 I found a block and tapped with cheer,
A # and id made the link appear,
Anchors now hop straight to the line,
Click the carrot — land just fine,
Hoppy docs, one fragment at a time.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The PR description follows the template structure with Summary, Changes, and Why sections, but omits the Test Plan and Related Issues sections.
Title check ✅ Passed The title 'docs: clarify block anchor links in lark-doc skill' is directly related to the main objective of the PR, which is to document and clarify how block anchor links work in the lark-doc skill documentation.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/doc-skill-anchor-url-guidance

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.

@fangshuyu-768 fangshuyu-768 changed the title docs: teach lark-doc skill about anchor URLs docs: document lark-doc anchor URL handling in skill guidance May 27, 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: 2

🤖 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 `@skills/lark-doc/references/style/lark-doc-update-workflow.md`:
- Line 22: The suggested anchor-handling command is missing the required
document identifier so it cannot run as written; extract the base document
URL/token (strip the `#...` anchor) from the user-provided `docx/wiki
URL#block_id` and add it to the fetch invocation (i.e., include the `--doc
<base_doc_url_or_token>` flag) when calling `docs +fetch --api-version v2
--scope section --start-block-id <anchor_block_id> --detail with-ids`, and keep
the existing fallback behavior to use a `range` fetch for very small local
edits.

In `@skills/lark-doc/SKILL.md`:
- Around line 20-21: Update the CLI example so the --doc flag only receives the
base document URL/token (no '#' anchor) and pass the block anchor separately via
--start-block-id or --block-id; specifically change the example command using
the lark-cli docs +fetch --api-version v2 invocation so it becomes something
like --doc "https://xxx.feishu.cn/docx/doxcnXXX" --start-block-id "blkcnAnchor"
(or --block-id "blkcnAnchor") and remove any '`#blkcnAnchor`' from the --doc
value.
🪄 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: 9c56e460-070e-4d77-aa4b-318aa105969e

📥 Commits

Reviewing files that changed from the base of the PR and between 367cfc9 and 2d565f9.

📒 Files selected for processing (4)
  • skills/lark-doc/SKILL.md
  • skills/lark-doc/references/lark-doc-fetch.md
  • skills/lark-doc/references/lark-doc-update.md
  • skills/lark-doc/references/style/lark-doc-update-workflow.md

Comment thread skills/lark-doc/references/style/lark-doc-update-workflow.md Outdated
Comment thread skills/lark-doc/SKILL.md Outdated
@codecov

codecov Bot commented May 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.11%. Comparing base (367cfc9) to head (5d8f56e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1120      +/-   ##
==========================================
+ Coverage   68.10%   68.11%   +0.01%     
==========================================
  Files         613      613              
  Lines       56396    56396              
==========================================
+ Hits        38409    38415       +6     
+ Misses      14809    14804       -5     
+ Partials     3178     3177       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented May 27, 2026

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

npm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@5d8f56e9798c8942b4dcd55204d38f629ca65248

🧩 Skill update

npx skills add larksuite/cli#fix/doc-skill-anchor-url-guidance -y -g

@fangshuyu-768
fangshuyu-768 force-pushed the fix/doc-skill-anchor-url-guidance branch from 07738a3 to 7bfac9b Compare May 27, 2026 03:04
@fangshuyu-768 fangshuyu-768 changed the title docs: document lark-doc anchor URL handling in skill guidance docs: document block anchor URLs in lark-doc skill May 27, 2026
@fangshuyu-768
fangshuyu-768 force-pushed the fix/doc-skill-anchor-url-guidance branch 2 times, most recently from fc0f811 to 23f75d4 Compare May 27, 2026 03:32
@fangshuyu-768
fangshuyu-768 force-pushed the fix/doc-skill-anchor-url-guidance branch from 23f75d4 to 5d8f56e Compare May 27, 2026 03:35
@fangshuyu-768 fangshuyu-768 changed the title docs: document block anchor URLs in lark-doc skill docs: clarify block anchor links in lark-doc skill May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain/ccm PR touches the ccm domain size/M Single-domain feat or fix with limited business impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants