Agent skill

Maa Logging

by MaaEnd in MaaEnd/MaaEnd

MaaFramework 日志宏用法指南,适用于 MaaEnd cpp-algo。Use when writing logging code, using LogInfo/LogError/LogWarn/LogDebug/LogTrace, outputting containers or custom types to logs, or when the user asks about…

AGPL-3.0Auto-check passedMobile

Install Maa Logging

skills CLI
$ npx skills add MaaEnd/MaaEnd --skill maa-logging -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install MaaEnd/MaaEnd maa-logging --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/MaaEnd/MaaEnd.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/maa-logging .claude/skills/maa-logging && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
maa-logging
GitHub stars
4k
Token cost
~807 tokens
SKILL.md length
86 words
Files
1
Skills in repo
14
Repo updated
First seen
Licence
AGPL-3.0

At a glance

MaaFramework 日志宏用法指南,适用于 MaaEnd cpp-algo。Use when writing logging code, using LogInfo/LogError/LogWarn/LogDebug/LogTrace, outputting containers or custom types to logs, or when the user asks about…

  • Works in 5 steps: 可构造 json::value → dumps() 输出(含… → 可构造 json::array → dumps() 输出(含序列容器) → 可构造 json::object → dumps() 输出(含 map) → …
  • Writing logging code
  • SKILL.md covers 可用宏, 核心原则:不要手动拼字符串, cpp-algo 典型用法 and 容器直接输出, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Maa Logging is an agent skill from MaaEnd/MaaEnd. MaaFramework 日志宏用法指南,适用于 MaaEnd cpp-algo。Use when writing logging code, using LogInfo/LogError/LogWarn/LogDebug/LogTrace, outputting containers or custom types to logs, or when the user asks about logging best practices in agent/cpp-algo/.

Its SKILL.md is about 810 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Mobile. It works with C++. The repository describes itself as: MaaEnd 终末地小助手:基于视觉 AI 的「明日方舟:终末地」自动化工具. The licence is AGPL-3.0.

When your agent uses it

  • Writing logging code
  • Using LogInfo/LogError/LogWarn/LogDebug/LogTrace
  • Outputting containers
  • Custom types to logs

Example prompts

  • “/maa-logging”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. 可构造 json::value → dumps() 输出(含 MEO_TOJSON 类型、基本类型)
  2. 可构造 json::array → dumps() 输出(含序列容器)
  3. 可构造 json::object → dumps() 输出(含 map)
  4. 有 operator<< → 直接流输出
  5. 以上都不满足 → static_assert 编译失败

What it can do on your machine

Read from SKILL.md and the folder at commit 047c8bf. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are cpp).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Maa Logging loads about 807 tokens when it runs. Until then it costs about 63 tokens; SKILL.md has 86 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~63
When it runs · the whole SKILL.md, loaded when a task matches
~807

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from MaaEnd/MaaEnd at commit 047c8bf, republished under its AGPL-3.0 licence (© MaaEnd). 86 words, ~807 tokens.

Download SKILL.mdSave it as .claude/skills/maa-logging/SKILL.md (or your agent's skills folder).
name
maa-logging
description
MaaFramework 日志宏用法指南,适用于 MaaEnd cpp-algo。Use when writing logging code, using LogInfo/LogError/LogWarn/LogDebug/LogTrace, outputting containers or custom types to logs, or when the user asks about logging best practices in agent/cpp-algo/.

MaaFramework 日志宏用法

头文件:<MaaUtils/Logger.h>

可用宏

宏级别
LogFatal / LogError / LogWarn错误与警告
LogInfo / LogDebug / LogTrace信息与调试
LogFunc函数作用域(进入打 enter,离开打 leave + 耗时)
VAR(x)格式化为 [x=value]
VAR_VOIDP(x)同上,但将指针转为 void* 输出

核心原则:不要手动拼字符串

用 << 流式输出即可,各片段间自动加空格分隔:

cpp
// Good
LogInfo << "OK " << VAR(result.position->zoneId) << VAR(result.position->x)
        << VAR(result.position->y) << VAR(result.position->score);

LogError << "MapLocateAction: Locator init failed";

// Bad - 日志中不要手动拼接(std::format 用于一般字符串构建是好的,但日志应直接用 << 和 VAR)
LogInfo << "OK " + std::to_string(x) + ", " + std::to_string(y);
LogInfo << std::format("position: ({}, {})", x, y);

cpp-algo 典型用法

自定义识别回调中的日志
cpp
#include <MaaUtils/Logger.h>

MaaBool MyRecognitionRun(MaaContext* context, MaaTaskId task_id,
    const char* node_name, ...)
{
    LogInfo << VAR(context) << VAR(task_id) << VAR(node_name);

    if (!locator) {
        LogError << "Locator init failed";
        return MAA_FALSE;
    }

    LogWarn << "Screen Blocked";
    LogInfo << "matched" << VAR(zone_id) << VAR(x) << VAR(y);
    return MAA_TRUE;
}
多变量输出
cpp
LogInfo << "Phase transition." << VAR(from_phase_name) << VAR(to_phase_name)
        << VAR(reason) << VAR(current_node_idx);

LogDebug << "Startup motion gate." << VAR(state->startup_anchor_initialized)
         << VAR(state->startup_motion_confirmed)
         << VAR(position.x) << VAR(position.y);

容器直接输出

vector、set、map<string, T> 等 STL 容器可以直接 <<,会自动序列化为 JSON:

cpp
std::vector<std::string> names = { "a", "b", "c" };
LogInfo << "names:" << names;       // 输出: names: ["a","b","c"]

std::map<std::string, int> config;
LogInfo << "config:" << config;     // 输出: config: {"key":value,...}

不需要手动写 for 循环来打印容器内容。

自定义类型输出

给结构体加 MEO_TOJSON(...) 或 MEO_JSONIZATION(...),即可直接输出:

cpp
struct LocateOutput {
    int status = 0;
    std::string message;
    int x = 0;
    int y = 0;

    MEO_JSONIZATION(status, message, MEO_OPT x, MEO_OPT y)
};

// 直接输出
LogInfo << VAR(output);
// 输出: [output={"status":0,"message":"...","x":123,"y":456}]

// 容器嵌套也能工作
std::vector<LocateOutput> results;
LogInfo << VAR(results);

原理简述

LogStream::stream 按优先级尝试:

  1. 可构造 json::value → dumps() 输出(含 MEO_TOJSON 类型、基本类型)
  2. 可构造 json::array → dumps() 输出(含序列容器)
  3. 可构造 json::object → dumps() 输出(含 map<string, T>)
  4. 有 operator<< → 直接流输出
  5. 以上都不满足 → static_assert 编译失败

如果遇到编译报错 "Unsupported type",给类型加 MEO_TOJSON 或特化 json::ext::jsonization<T> 即可。

© MaaEnd, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/maa-logging of MaaEnd/MaaEnd.

Open the folder on GitHubat commit 047c8bf

Compare with similar skills

Maa Logging next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Maa Logging compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Maa Logging this skillMaaEnd/MaaEnd4k—~807Automated safety check: PassAGPL-3.0
Cppsickn33/agentic-awesome-skills47k1 repos~1.6kAutomated safety check: PassMIT
Fory Version Bumpapache/fory4.6k—~1.1kAutomated safety check: PassApache-2.0
Fory Performance Optimizationapache/fory4.6k—~2.2kAutomated safety check: PassApache-2.0
Crossbindcrossbind/crossbind148—~1.1kAutomated safety check: PassMIT
Audit Xcode Security Settingssuperagents-lab/xcode27-skills337—~4.6kAutomated safety check: PassNone

Similar skills

  • Cpp

    sickn33/agentic-awesome-skills

    Language-specific super-code guidelines for cpp. An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 1 repo~1.6k tokens
    MobileAuto-check passed
  • Bump Apache Fory release or post-release development versions across Java, Kotlin, Scala, Python, Rust, Go, C++, C, Dart, JavaScript, Swift, integration tests, examples, and source docs.

    4.6k GitHub stars~1.1k tokensUpdated today
    MobileAuto-check passed
  • Run profile-driven bottleneck optimization across Apache Fory implementations (Java, C++, Python/Cython, Go, Rust, Swift, C, JavaScript/TypeScript, Dart, Kotlin, Scala).

    4.6k GitHub stars~2.2k tokensUpdated today
    MobileAuto-check passed
  • Crossbind

    crossbind/crossbind

    A skill your agent uses when a user wants to call C++ or Rust from JavaScript or TypeScript; add a native library such as GDAL, SQLite, OpenSSL, GEOS or PROJ to a browser, Node.js, Cloudflare Worker…

    148 GitHub stars~1.1k tokensUpdated today
    MobileAuto-check passed
  • Audit Xcode Security Settings

    superagents-lab/xcode27-skills

    Audit and enable security-oriented Xcode build settings. An agent skill from superagents-lab/xcode27-skills.

    337 GitHub stars~4.6k tokensUpdated 4 mo ago
    MobileAuto-check passed
  • Build Nitro Modules

    margelo/react-native-skills

    Builds and designs React Native Nitro Modules with Nitrogen, HybridObject TypeScript specs, Nitro View components, generated native implementations, zero-copy and native-state APIs, Swift/Kotlin/C++…

    175 GitHub stars~9.9k tokensUpdated 1 mo ago
    MobileAuto-check passed

More from MaaEnd/MaaEnd

All 14 skills in this repo
  • Maaend Test Image

    MaaEnd/MaaEnd

    为 MaaEnd 添加、导入或补充节点识别测试截图,并按仓库约定脱敏图片、放入 tests/MaaEndTestset、维护 tests//test.json 和运行 pnpm check/pnpm test 验证。用户提到“添加测试图片/截图”“把截图加入 ADB 或 Win32 测试集”“给节点补正例或反例”“更新 hits/box”“UID…

    4k GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Meojson

    MaaEnd/MaaEnd

    Guide for using the meojson C++ JSON library in MaaEnd cpp-algo.

    4k GitHub stars~2.1k tokensUpdated today
    Auto-check passed
  • 新增或改写 MaaEnd 的 AutoCollect 自动采集路线说明。默认包含路线文件创建、AutoCollect 主入口接线、任务选项注册和多语言文案补充。适用于“参考现有 AutoCollect 路线新建一条采集线”“给定传送点与路径点位生成 AutoCollectRouteX.json 并注册到任务中”“用户已经写好路线文件,只需要补注册接口”等场景。注意:本 skill 仅适用于参考…

    4k GitHub stars~3.2k tokensUpdated today
    Auto-check passed
  • 仅分析 AutoStockStapleMain 的 MaaEnd 日志。用于还原该任务实际购买了什么、购买所对应的证据、逐步剩余账单(券/账单)数值时间线,以及在 pipeline 或 go-service 中应当加日志/埋点的位置。适用于用户询问 AutoStockStapleMain、AutoStockStaple、武陵/四号谷地的稳定需求物资购买,或该任务内账单数值变化原因等场景。

    4k GitHub stars~2.8k tokensUpdated today
    Auto-check passed
  • Cpp Algo Style

    MaaEnd/MaaEnd

    MaaEnd cpp-algo C++ 编码风格与工程规范指南。参考 MaaFramework 的优秀实践,规范命名、头文件、公共工具、错误处理、日志、CMake 等方面。在编写、修改或审查 agent/cpp-algo/ 下的 C++ 代码时使用。

    4k GitHub stars~2.3k tokensUpdated today
    Auto-check passed
  • 分析 MaaEnd CreditShoppingMain 的日志。用于还原信用购物任务中实际购买了什么商品、每件商品的折扣力度、是否触发过刷新(或刷新次数已用尽)、稳健刷新是否触发、以及信用点的消耗状况。货架槽位必须以日志中的 CreditIcon(TemplateMatcher)为锚,有无 BuyFirstOCR/Priority2OCR…

    4k GitHub stars~2.8k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Maa Logging

What does Maa Logging do?

MaaFramework 日志宏用法指南,适用于 MaaEnd cpp-algo。Use when writing logging code, using LogInfo/LogError/LogWarn/LogDebug/LogTrace, outputting containers or custom types to logs, or when the user asks about…. Maa Logging is an agent skill from MaaEnd/MaaEnd. MaaFramework 日志宏用法指南,适用于 MaaEnd cpp-algo。Use when writing logging code, using LogInfo/LogError/LogWarn/LogDebug/LogTrace, outputting containers or custom types to logs, or when the user asks about logging best practices in agent/cpp-algo/.

When should I use Maa Logging?

Maa Logging fits situations like: writing logging code; using LogInfo/LogError/LogWarn/LogDebug/LogTrace; outputting containers; custom types to logs.

How do I install Maa Logging in Claude Code?

Run `npx skills add MaaEnd/MaaEnd --skill maa-logging -a claude-code`. Or copy the skill folder (.agents/skills/maa-logging in MaaEnd/MaaEnd) into .claude/skills/maa-logging in your project. Claude Code loads it when a task matches its description.

How do I install Maa Logging in Codex?

Run `npx skills add MaaEnd/MaaEnd --skill maa-logging -a codex`. Or copy the skill folder (.agents/skills/maa-logging in MaaEnd/MaaEnd) into .agents/skills/maa-logging in your project. Codex loads it when a task matches its description.

Can I use Maa Logging in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add MaaEnd/MaaEnd --skill maa-logging -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/maa-logging, .gemini/skills/maa-logging, .github/skills/maa-logging and .opencode/skills/maa-logging in your project.

What does Maa Logging need to run?

SKILL.md names no scripts, command-line tools or credentials: Maa Logging is instructions for the agent only.

Does Maa Logging access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Maa Logging safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Maa Logging use?

Maa Logging is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Maa Logging use?

About 807 tokens (SKILL.md is roughly 3.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Maa Logging?

Skills that share tags, products or a category with Maa Logging: Cpp (sickn33/agentic-awesome-skills, 47k stars), Fory Version Bump (apache/fory, 4.6k stars), Fory Performance Optimization (apache/fory, 4.6k stars) and Crossbind (crossbind/crossbind, 148 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Maa Logging?

MaaEnd (a GitHub organization) maintains it in MaaEnd/MaaEnd, which has 3,982 GitHub stars. The repository holds 14 skills in this directory. The repository was last updated on October 7, 2026.

Source: MaaEnd/MaaEnd on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.