openlark AGENTS.md

A contributor guide for OpenLark, a Rust software development kit for Feishu/Lark, an enterprise messaging and collaboration platform. It maps the repository’s business modules and key source locations.

In plain words
What is it for?
Use it when adding Feishu/Lark APIs, working on authentication, HTTP requests, WebSockets, errors, documents, human resources, workflows, or meetings.
Why use it?
It helps an agent find the right module and shared infrastructure instead of searching the whole repository or placing an API in the wrong area.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/foxzool/openlark/agents-md
Clone the repo
git clone --depth 1 https://github.com/foxzool/openlark

Made for: Codex, OpenCode.

Per session 2,416 This file is loaded in full into every session.
When invoked 2,416 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.02416 $0.02416
Opus 5 $0.01208 $0.01208
Sonnet 5 $0.00483 $0.00483
Haiku 4.5 $0.00242 $0.00242

Measured 2d ago against content hash e48241638649, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

openlark AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 162 lines

How it starts

The opening of the file, as written. The whole thing — 162 lines — stays where its author put it; the contents beside it link to each section on GitHub.

OpenLark Knowledge Base

Project: OpenLark - 飞书开放平台 Rust SDK
Stack: Rust, Tokio, Reqwest, WebSocket
Version: 0.20.0 Repository: https://github.com/foxzool/openlark

OVERVIEW

OpenLark 是为飞书(Feishu/Lark)开放平台构建的企业级 Rust SDK,提供 1,560+ 个 API 的类型安全访问。采用模块化架构设计,支持按需编译和功能组合。

STRUCTURE

.
├── crates/                    # 18 个业务模块 crates
│   ├── openlark-core/        # 核心基础设施(HTTP、错误处理)
│   ├── openlark-client/      # 高级客户端(meta 链式入口)
│   ├── lark-websocket-protobuf/ # WebSocket protobuf 协议(预生成源码)
│   ├── openlark-auth/        # 认证服务
│   ├── openlark-communication/  # IM 消息和联系人
│   ├── openlark-docs/        # 云文档和表格(158 APIs)
│   ├── openlark-hr/          # HR 和招聘(562 APIs)
│   ├── openlark-workflow/    # 任务和审批
│   ├── openlark-meeting/     # 视频会议
│   └── ... (其他业务模块)
├── src/                      # 根 crate 导出
├── examples/                 # 使用示例
├── tests/                    # 集成测试
└── tools/                    # 开发和维护脚本

WHERE TO LOOK

Task Location Notes
添加新 API crates/openlark-*/src/**/v*/ 按业务模块和版本组织
错误处理 crates/openlark-core/src/error/ CoreError 企业级错误系统
HTTP 客户端 crates/openlark-core/src/http.rs 共享 reqwest 配置
模型定义 */models.rs*/models/ Serde 序列化结构体
Feature flags Cargo.toml [features] 50+ 功能标志

CONVENTIONS

模块组织

  • 业务领域驱动: 按功能(HR/Docs/IM)而非技术层次组织
  • 版本化 API: v1/, v2/ 子目录管理不同 API 版本
  • 模型分离: 请求/响应模型放在 models/models.rs

代码风格

  • 中文优先: 文档和注释使用中文,面向中国开发者
  • Builder 模式: API 请求使用流畅的构建器模式
  • Feature 条件编译: #[cfg(feature = "...")] 控制模块编译
  • 错误处理: 统一使用 CoreError,支持链式错误上下文

API 实现模式

// 1. 定义请求结构体(Builder 模式)
pub struct CreateXxxRequest { config: Config, ... }
impl CreateXxxRequest {
    pub fn new(config: Config) -> Self { ... }
    pub fn field(mut self, value: T) -> Self { ... }
    pub async fn execute(self) -> Result<XxxResponse> { ... }
}

// 2. 模型使用 Serde
#[derive(Debug, Serialize, Deserialize)]
pub struct XxxResponse { ... }

// 3. 验证使用宏
validate_required!(self.field, "字段不能为空");

Read the full file on GitHub · 162 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 162 lines · 2,416 tokens per session scan A e48241638649

Subscribe to this mod's changes

openlark AGENTS.md is an instructions file published in the GitHub repository foxzool/openlark (105 stars, last pushed 4d ago), licensed Apache-2.0. It adds 2,416 tokens to every session, about $0.0121 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.