Agent skill

Mas Function Design

by AUTO-MAS-Project in AUTO-MAS-Project/AUTO-MAS

Define backend function design standards for Python services.

AGPL-3.0Auto-check passedDevelopment

Install Mas Function Design

skills CLI
$ npx skills add AUTO-MAS-Project/AUTO-MAS --skill mas-function-design -a claude-code

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

GitHub CLI
$ gh skill install AUTO-MAS-Project/AUTO-MAS mas-function-design --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/AUTO-MAS-Project/AUTO-MAS.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/mas-function-design .claude/skills/mas-function-design && 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
mas-function-design
GitHub stars
707
Token cost
~1.7k tokens
SKILL.md length
920 words
Files
2
Skills in repo
15
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Define backend function design standards for Python services.

  • Works in 5 steps: Keep one primary responsibility per… → Make data flow explicit through inputs… → Minimize hidden side effects and shared… → …
  • Refactoring functions in app/
  • SKILL.md covers Objective, Core Principles, Responsibility and Signatures And Returns, plus 6 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Mas Function Design is an agent skill from AUTO-MAS-Project/AUTO-MAS. Define backend function design standards for Python services. Use when implementing or refactoring functions in app/, choosing function boundaries, designing signatures and return contracts, controlling side effects, and reviewing correctness/readability in core/task/services/api modules.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/openai.yaml`).

It sits in Development, covering Plain language and style rules and Refactoring. It works with Python. The repository describes itself as: 多脚本多配置统一管理与自动化工具 | 轻松管理大量脚本并存储多个用户配置、设计自动化任务流、监看脚本日志,大幅提高自动化代理效率与稳定性!. The licence is AGPL-3.0.

When your agent uses it

  • Refactoring functions in app/
  • Choosing function boundaries
  • Designing signatures and return contracts
  • Controlling side effects

Example prompts

  • “/mas-function-design”

Requirements

  • Python 3

Workflow steps

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

  1. Keep one primary responsibility per function.
  2. Make data flow explicit through inputs and return values.
  3. Minimize hidden side effects and shared mutable state.
  4. Keep error semantics stable and actionable.
  5. Match function placement with module boundary ownership.

What it can do on your machine

Read from SKILL.md and the folder at commit 699de5a. 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.

    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

Mas Function Design loads about 1.7k tokens when it runs. Until then it costs about 77 tokens; SKILL.md has 920 words of instructions outside code blocks.

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

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 AUTO-MAS-Project/AUTO-MAS at commit 699de5a, republished under its AGPL-3.0 licence (© AUTO-MAS-Project). 920 words, ~1,687 tokens.

Download SKILL.mdSave it as .claude/skills/mas-function-design/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
mas-function-design
description
Define backend function design standards for Python services. Use when implementing or refactoring functions in app/, choosing function boundaries, designing signatures and return contracts, controlling side effects, and reviewing correctness/readability in core/task/services/api modules.

MAS Function Design

Objective

Design backend functions that are predictable, easy to trace, and easy to evolve.

Core Principles

  1. Keep one primary responsibility per function.
  2. Make data flow explicit through inputs and return values.
  3. Minimize hidden side effects and shared mutable state.
  4. Keep error semantics stable and actionable.
  5. Match function placement with module boundary ownership.

Responsibility

  1. Keep a function focused on one decision unit or one orchestration step.
  2. Split when a function mixes domain decision and integration IO.
  3. Split when one function serves unrelated call paths.
  4. Keep thin wrappers thin; move real logic only when it creates real reuse.
  5. Do not extract a helper for logic that is easier to understand inline at the call site.
  6. For frequently edited task-configuration code, keep the mutation block in the owning orchestration function with a short purpose comment and blank lines around it.
  7. Do not split one linear task flow into builder/loader helpers unless the split removes real duplication or clarifies a true boundary.
  8. In AUTO-MAS task flows, keep config import/export, log monitoring, and end-state judgment as explicit orchestration steps; do not hide product-critical run criteria behind vague wrappers.

Signatures And Returns

  1. Use explicit named parameters for business-critical options.
  2. Avoid ambiguous boolean positional parameters.
  3. Group related data in typed models/dataclasses when argument count grows.
  4. Keep optional parameters truly optional with clear default meaning.
  5. Return one stable shape per function role.
  6. Return domain values, not transport-layer response objects.
  7. Prefer signatures that remain compatible with basic static type checking.
  8. If omission is a valid state, omit the argument or field instead of passing a typed placeholder that conflicts with the signature.
  9. Use positional arguments only for simple, obvious calls with at most two clear parameters.
  10. Use keyword arguments for boolean arguments and for calls with more than two parameters.

Error Handling

  1. Raise domain-meaningful exceptions at domain layers.
  2. Convert exceptions to API-safe output only at API boundary.
  3. Do not swallow exceptions without logging context and fallback reason.
  4. Keep retry logic near integration boundaries, not in pure helpers.
  5. Include enough context in errors for diagnosis (script_id, user_id, step).

Side Effects And Async

  1. Keep file IO, network, process, and global state operations explicit.
  2. Isolate side effects behind service/helper functions.
  3. In pure transformation functions, avoid logging and external calls.
  4. Do not mutate input objects unless the contract explicitly states mutation.
  5. Use async only when awaiting IO or async coordination primitives.
  6. Keep cancellation-safe cleanup in finally blocks for long-running flows.
  7. Avoid mixing sync blocking calls directly in async hot paths.
  8. Do not ship a function body containing module lazy imports to a thread pool (asyncio.to_thread/run_in_executor): resolve imports on the event loop or at startup, then pass the imported callables to the thread. Concurrent cold imports of one package from multiple worker threads can deadlock on CPython's per-module import locks or observe half-initialized modules.
  9. Keep task spawning in orchestrator-level functions, not leaf utilities.
  10. Trust existing base-layer guarantees instead of repeating their correction logic in every function.
  11. Prefer one clear wait/check block over several tiny sleeps, logs, or staged wrappers that express the same step.
  12. When success/failure depends on log text, log timestamps, and process exit together, keep that decision rule centralized and readable instead of scattering partial checks across helpers.
  13. TaskExecuteBase.main_task, final_task, and on_crash are the required execution contract for task classes; keep their responsibilities distinct.
  14. main_task and final_task may raise normally, but on_crash must protect itself from uncaught exceptions.
  15. Await child task spawning through await self.spawn(...); do not fire child tasks without awaiting unless the owning orchestration has a documented reason.
  16. Use .cancel() plus await .accomplish.wait() when parent code must wait for nested task shutdown and cleanup to finish.
Show full SKILL.md (277 more words)Show less

Placement

  1. api: parse input, call core/service, map output.
  2. core: orchestrate flow and state transitions.
  3. task: execute domain run lifecycle per script type.
  4. services: wrap external/system capabilities.
  5. utils: generic reusable helpers without business policy.
  6. models/schema: no business logic functions.

Naming

  1. Use verb-first names for actions (load_*, build_*, merge_*, send_*).
  2. Use check_* for validation returning status/result.
  3. Use prepare_* for pre-run setup.
  4. Use finalize_* or cleanup_* for teardown semantics.
  5. Avoid vague names like handle or process without scope words.

Refactor Triggers

  1. Function exceeds clear readability for one screenful of logic.
  2. Same decision branch appears in multiple places.
  3. Repeated parameter bundles travel together across call sites.
  4. Testing one behavior requires heavy environment setup.
  5. A dict/registry mapping can replace multiple near-identical branches without hiding the main flow.
  6. A proposed helper adds more lookup cost than it removes.
  7. A proposed fallback only mirrors an invariant already enforced by the owning model or base class.

Review Checklist

  1. Function has one primary responsibility.
  2. Signature is explicit and stable for callers.
  3. Return shape is typed and consistent.
  4. Error behavior is clear and layered correctly.
  5. Side effects are visible and isolated.
  6. Placement follows mas-module-boundary.
  7. Shared schema semantics align with mas-schema-naming.
  8. One-off helpers were not extracted unless they created real reuse.
  9. Existing base-layer guarantees were reused instead of reimplemented in the function body.
  10. Optional values and temporary placeholders remain type-safe under basic static analysis.
  11. Multi-argument and boolean-heavy calls use keyword arguments for readability and fewer ordering mistakes.
  12. Task classes preserve the documented main_task/final_task/on_crash lifecycle and nested cancellation behavior.

© AUTO-MAS-Project, 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

SKILL.md and 1 other file in .agents/skills/mas-function-design of AUTO-MAS-Project/AUTO-MAS.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit 699de5a

Compare with similar skills

Mas Function Design 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.

Mas Function Design compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mas Function Design this skillAUTO-MAS-Project/AUTO-MAS707—~1.7kAutomated safety check: PassAGPL-3.0
Code RefinerMathews-Tom/armory327—~3.1kAutomated safety check: PassMIT
Dignified Python Standardsdocling-project/docling68k—~1.5kAutomated safety check: PassApache-2.0
Readable Pycrazyguitar/pysheeet8.2k—~2.4kAutomated safety check: PassMIT
Nexus MapperHaaaiawd/Nexus-skills1661 repos~2.5kAutomated safety check: NotesNone
Refactor OpCVCUDA/CV-CUDA2.7k—~1.5kAutomated safety check: PassCustom licence

Similar skills

  • Code Refiner

    Mathews-Tom/armory

    Deep code simplification and refactoring preserving behavior across Python, Go, TypeScript, Rust.

    327 GitHub stars~3.1k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Dignified Python Standards

    docling-project/docling

    Applies opinionated production Python conventions chosen by the project's Python version: modern type syntax, pathlib, explicit checks and interface guidance.

    68k GitHub stars~1.5k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Readable Py

    crazyguitar/pysheeet

    Readable Python code rules inspired by The Art of Readable Code.

    8.2k GitHub stars~2.4k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Nexus Mapper

    Haaaiawd/Nexus-skills

    Generate a persistent .nexus-map/ knowledge base that lets any AI session instantly understand a codebase's architecture, systems, dependencies, and change hotspots.

    166 GitHub starsUsed in 1 repo~2.5k tokens
    DevelopmentAuto-check: notes
  • Refactor Op

    CVCUDA/CV-CUDA

    Find and safely apply per-operator refactoring / redundancy-reduction opportunities in a CV-CUDA operator (near-duplicate Tensor/VarShape kernels, reinvented shared utilities, dead code).

    2.7k GitHub stars~1.5k tokensUpdated 21 days ago
    DevelopmentAuto-check passed
  • Readable Verilog Generator

    Eriemon/verilog-generator

    A skill your agent uses when creating, writing, reviewing, annotating, repairing, refactoring, or validating readable Verilog RTL, including synthesizable Verilog-2001 .v files, existing-RTL…

    308 GitHub stars~5.4k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed

More from AUTO-MAS-Project/AUTO-MAS

All 15 skills in this repo
  • Mas Game Sign

    AUTO-MAS-Project/AUTO-MAS

    Add, refactor, or review AUTO-MAS game community sign-in (game sign) code, including the provider registry in app/tools/gamesign.py, platform adapters for Skland/Miyoushe/Kuro/Taygedo, credential…

    707 GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • Mas Schema Naming

    AUTO-MAS-Project/AUTO-MAS

    Define canonical naming for future backend schema domains. An agent skill from AUTO-MAS-Project/AUTO-MAS.

    707 GitHub stars~1k tokensUpdated today
    Auto-check passed
  • Mas Code Standards

    AUTO-MAS-Project/AUTO-MAS

    A skill your agent uses when implementing, fixing, refactoring, or reviewing non-generated AUTO-MAS code, or when preparing code-style guidance, comments, docstrings, version notes, or Conventional…

    707 GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • Mas Frontend UI

    AUTO-MAS-Project/AUTO-MAS

    A skill your agent uses when working on AUTO-MAS frontend UI, Ant Design Vue components, page layout, forms, tables, modals, drawers, feedback, empty/loading/error states, drag interactions, dark…

    707 GitHub stars~3.8k tokensUpdated today
    Auto-check passed
  • Mas Script Specialized Adapter

    AUTO-MAS-Project/AUTO-MAS

    Review, add, or refactor AUTO-MAS specialized script adapters by upstream architecture, including MAA, SRC, MaaEnd/MXU, General, ok-script adapters such as Okww and OkNte, multi-engine adapters such…

    707 GitHub stars~2.8k tokensUpdated today
    Auto-check passed
  • Mas API Contract

    AUTO-MAS-Project/AUTO-MAS

    Define backend API contract standards for FastAPI services. An agent skill from AUTO-MAS-Project/AUTO-MAS.

    707 GitHub stars~1.9k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Mas Function Design

What does Mas Function Design do?

Define backend function design standards for Python services. Mas Function Design is an agent skill from AUTO-MAS-Project/AUTO-MAS. Define backend function design standards for Python services.

When should I use Mas Function Design?

Mas Function Design fits situations like: refactoring functions in app/; choosing function boundaries; designing signatures and return contracts; controlling side effects.

How do I install Mas Function Design in Claude Code?

Run `npx skills add AUTO-MAS-Project/AUTO-MAS --skill mas-function-design -a claude-code`. Or copy the skill folder (.agents/skills/mas-function-design in AUTO-MAS-Project/AUTO-MAS) into .claude/skills/mas-function-design in your project. Claude Code loads it when a task matches its description.

How do I install Mas Function Design in Codex?

Run `npx skills add AUTO-MAS-Project/AUTO-MAS --skill mas-function-design -a codex`. Or copy the skill folder (.agents/skills/mas-function-design in AUTO-MAS-Project/AUTO-MAS) into .agents/skills/mas-function-design in your project. Codex loads it when a task matches its description.

Can I use Mas Function Design 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 AUTO-MAS-Project/AUTO-MAS --skill mas-function-design -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mas-function-design, .gemini/skills/mas-function-design, .github/skills/mas-function-design and .opencode/skills/mas-function-design in your project.

What does Mas Function Design need to run?

SKILL.md names no scripts, command-line tools or credentials: Mas Function Design is instructions for the agent only. Our summary lists: Python 3.

Does Mas Function Design 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 Mas Function Design 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 Mas Function Design use?

Mas Function Design 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 Mas Function Design use?

About 1.7k tokens (SKILL.md is roughly 6.7k 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 Mas Function Design?

Skills that share tags, products or a category with Mas Function Design: Code Refiner (Mathews-Tom/armory, 327 stars), Dignified Python Standards (docling-project/docling, 68k stars), Readable Py (crazyguitar/pysheeet, 8.2k stars) and Nexus Mapper (Haaaiawd/Nexus-skills, 166 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Mas Function Design?

AUTO-MAS-Project (a GitHub organization) maintains it in AUTO-MAS-Project/AUTO-MAS, which has 707 GitHub stars. The repository holds 15 skills in this directory. The repository was last updated on October 7, 2026.

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