file-rules

Enforces file placement and naming conventions for OpenClaw project components.

Updated Mar 30, 2026
One-click install
npx skills add https://github.com/guizonatto/myopen-claw --skill file-rules-guizonatto
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: file-rules
Source: https://github.com/guizonatto/myopen-claw/tree/main/.claude/skills/file-rules
Command: npx skills add https://github.com/guizonatto/myopen-claw --skill file-rules-guizonatto

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It prevents developers and AI agents from creating Python files in the wrong directories or with inconsistent names, keeping the OpenClaw project structure predictable and maintainable. ## Core Features & Use Cases - Directory mapping rules: Defines exactly where each component type belongs, such as data collection in skills/, external integrations in tools/, orchestration in pipes/, scheduling in crons/, and event handling in triggers/. - Mandatory naming conventions: Enforces patterns like {dominio}_{acao}.py for skills and {processo}_pipe.py for pipes, plus required test files under tests/. - Atomicity and prohibition rules: Requires header docstrings with ENV_VARS and DB_TABLES, standalone main execution, and forbids horizontal imports between skills or tools and hardcoded credentials. - Use Case: When asked to add a new LinkedIn monitoring feature, the AI automatically creates linkedin_fetch.py in skills/, linkedin_monitor_pipe.py in pipes/, and a matching test file instead of scattering logic across the codebase. ## Quick Start Apply the file-rules conventions whenever creating any new Python component in this OpenClaw project.

Frequently Asked Questions about file-rules

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Where should I put a new Python script in an OpenClaw project?

Placement depends on the component type: data collection goes in skills/, external integrations in tools/, orchestration in pipes/, scheduled jobs in crons/, event handlers in triggers/, and reusable utilities in openclaw/. Tests always go in tests/{layer}/.

How do I name files for skills, tools, and pipes?

Skills use {dominio}_{acao}.py like linkedin_fetch.py, tools use {canal}_notify.py or {canal}_scraper.py, and pipes use {processo}_pipe.py. Crons, triggers, and agents follow similar suffix-based patterns.

Can a skill import another skill in this architecture?

No, horizontal imports are forbidden. Skills cannot import other skills and tools cannot import other tools; shared logic must be placed as a reusable utility in the openclaw/ directory instead.

What is required in every component's docstring?

Every component must include a header docstring declaring ENV_VARS and DB_TABLES, expose a public interface like run() or send(), and include an if __name__ == "__main__" block for standalone execution.

When should skills be grouped into a subdirectory?

Keep up to two skills of the same domain flat in skills/. When a domain reaches three or more skills, create a subdirectory skills/{dominio}/ with an __init__.py file.