Skip to content

docs(base): document Base attachment download via docs +media-download#404

Merged
kongenpei merged 2 commits intomainfrom
docs/base-skill-download-attachment
Apr 10, 2026
Merged

docs(base): document Base attachment download via docs +media-download#404
kongenpei merged 2 commits intomainfrom
docs/base-skill-download-attachment

Conversation

@dengfanxin
Copy link
Copy Markdown
Collaborator

@dengfanxin dengfanxin commented Apr 10, 2026

Summary

Document the correct way to download files from Base attachment fields. Base attachment files cannot be downloaded via lark-cli drive +download (which returns HTTP 403). The correct command is lark-cli docs +media-download --token
<file_token>, which is already documented in the lark-doc skill. This PR just adds cross-references from lark-base to that existing documentation.

Changes

  • skills/lark-base/SKILL.md: add download entries to the field classification table (section 3.1), the task routing table (section 3.2), and the record commands reference (section 2.3.3), all linking to lark-doc/references/lark-doc-media-download.md
  • skills/lark-base/references/lark-base-record.md: add download entry to the command navigation table and notes section, linking to the same lark-doc reference
  • A single warning that drive +download cannot be used (in the field classification table) to stop agents from reaching for the wrong command

No new reference doc — we reuse the existing thorough documentation in lark-doc instead of duplicating it.

Test Plan

  • node scripts/skill-format-check/test.sh — skill format check passes
  • Manual verification against real Base attachments: uploaded a file via +record-upload-attachment, retrieved the file_token via +record-get, downloaded with docs +media-download --token , md5 matches the source file

Related Issues

  • None

Summary by CodeRabbit

  • Documentation
    • Added guidance for downloading Base attachment files using the lark-cli docs +media-download command.
    • Explained how to obtain and provide the required --token parameter from attachment records.
    • Clarified routing and proper command usage for handling Base attachments (including --output usage).

Base attachment files must be downloaded via 'lark-cli docs +media-download',
not 'lark-cli drive +download' (which returns HTTP 403). The existing
lark-doc reference already documents the command thoroughly, so this PR
just adds entries to the lark-base skill that reference it.

- SKILL.md: add download row to field classification, routing, and record
  commands tables, referencing lark-doc-media-download.md
- references/lark-base-record.md: add download entry to the command
  navigation table and notes, referencing lark-doc-media-download.md
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 10, 2026

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added domain/base PR touches the base domain size/M Single-domain feat or fix with limited business impact labels Apr 10, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 10, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 23983956-fb39-4468-b176-302c753eee85

📥 Commits

Reviewing files that changed from the base of the PR and between a9d7b93 and d513fdb.

📒 Files selected for processing (2)
  • skills/lark-base/SKILL.md
  • skills/lark-base/references/lark-base-record.md
✅ Files skipped from review due to trivial changes (2)
  • skills/lark-base/references/lark-base-record.md
  • skills/lark-base/SKILL.md

📝 Walkthrough

Walkthrough

Added documentation entries guiding users to download Lark Base attachment files using lark-cli docs +media-download with a --token <file_token> obtained from the attachment field in +record-get; clarified that lark-cli drive +download returns 403 for Base attachments.

Changes

Cohort / File(s) Summary
Base Attachment Download Documentation
skills/lark-base/SKILL.md, skills/lark-base/references/lark-base-record.md
Added command navigation and usage details for lark-cli docs +media-download --token <file_token> --output <path>, explained deriving file_token from the attachment field array returned by +record-get, and noted that drive download returns 403 for Base attachments.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 I found a token, tucked away in a row,
A record's attachment whispered where to go,
With +media-download I hop and cheer,
Files come down—no 403 fear! 📎✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: documenting Base attachment download using the correct command (docs +media-download) instead of the incorrect drive +download.
Description check ✅ Passed The description fully follows the template with all required sections completed: Summary explains the motivation, Changes details the file modifications with specific section references, Test Plan documents verification steps (skill format check and manual testing), and Related Issues is present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/base-skill-download-attachment

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

@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Apr 10, 2026

Greptile Summary

This PR adds cross-reference documentation for downloading Base attachment files via lark-cli docs +media-download, fixing the gap where agents might incorrectly use lark-cli drive +download (which returns HTTP 403 for Base attachments). Changes are purely documentation — three new rows in SKILL.md (§3.1 field table, §3.2 routing table, §2.3.3 record commands) and one new row plus a note in lark-base-record.md, all pointing to the existing lark-doc/references/lark-doc-media-download.md reference.

Confidence Score: 5/5

Documentation-only PR with no code changes; safe to merge.

All changes are cross-reference additions in Markdown documentation. The §2.3.3 routing row correctly names the drive +download anti-pattern, both explicit command examples include the required --output flag, and all relative paths resolve correctly. The one open concern (§3.2 "不要误走" cell content) is a P2 style improvement already flagged in a prior review thread; no new P0/P1 issues were found.

skills/lark-base/SKILL.md §3.2 — "不要误走" column for the download row carries a token-source hint rather than an explicit anti-pattern warning (flagged in a prior thread).

Important Files Changed

Filename Overview
skills/lark-base/SKILL.md Adds download guidance in §3.1, §3.2, and §2.3.3; §2.3.3 correctly names the drive +download anti-pattern, but §3.2 "不要误走" cell uses that column for a token-source hint rather than the expected anti-pattern warning, leaving the column inconsistent with all other rows.
skills/lark-base/references/lark-base-record.md Adds download navigation entry and note; the notes section (line 28) correctly includes both --token and --output in the full example command.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User wants to download Base attachment] --> B[+record-get to retrieve record]
    B --> C[Extract file_token from attachment field array]
    C --> D["lark-cli docs +media-download\n--token <file_token> --output <path>"]
    D --> E[File saved locally]

    A --> F["❌ lark-cli drive +download\n(returns HTTP 403 for Base attachments)"]
    F --> G[Error — wrong command]

    style F fill:#ffcccc,stroke:#cc0000
    style G fill:#ffcccc,stroke:#cc0000
    style D fill:#ccffcc,stroke:#006600
    style E fill:#ccffcc,stroke:#006600
Loading

Reviews (2): Last reviewed commit: "docs: add output flag to base attachment..." | Re-trigger Greptile

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 10, 2026

🚀 PR Preview Install Guide

🧰 CLI update

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

🧩 Skill update

npx skills add larksuite/cli#docs/base-skill-download-attachment -y -g

@kongenpei kongenpei self-requested a review April 10, 2026 14:01
@kongenpei kongenpei merged commit 474cb30 into main Apr 10, 2026
9 of 10 checks passed
@kongenpei kongenpei deleted the docs/base-skill-download-attachment branch April 10, 2026 14:13
@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Apr 10, 2026

Tip:

Greploop — Automatically fix all review issues by running /greploops in Claude Code. It iterates: fix, push, re-review, repeat until 5/5 confidence.

Use the Greptile plugin for Claude Code to query reviews, search comments, and manage custom context directly from your terminal.

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

Labels

domain/base PR touches the base 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.

3 participants