agentleFS
realsenseairealsenseai/librealsense/.claude/skills/file-creation/SKILL.md

file-creation

Skill9.1k starsChanged 27 days agoApache-2.0View on GitHub

Create new source files in the source tree (not a build directory) with the required copyright header. Use before adding any new file to the repository.

Trending

Steady talk.about the whole repository

Dec 2025: 1 mentionJan 2026: 3 mentionsFeb 2026: 1 mentionMar 2026: 1 mentionApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 3 mentionsJul 2026: 5 mentionsAug 2026: 6 mentionsSep 2026: 6 mentionsOct 2026: 6 mentionsNov 2026: 2 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the realsenseai/librealsense repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about realsenseai/librealsense

The biggest 5 of 34 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 34

Talked about on GitHub (34 times).

On GitHub · 34

29 more on GitHub

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 6 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When creating new code files, it is critical to ensure they are placed in the project's source tree and NOT in build or temporary …

    line 8
  2. Distinctive:

    Before creating a file, always inspect the Current Working Directory (CWD).

    line 13
  3. Distinctive:

    If you are in a build directory, identify the path to the Source Root.

    line 22
  4. Very specific:

    Look for .git/, LICENSE, README.md, or the top-level CMakeLists.txt.

    line 23
  5. Distinctive:

    Ensure the parent directory of the file you intend to create exists in the *Source* location.

    line 27
  6. Distinctive:

    Use the calculated relative prefix in the file path.

    line 30
  7. Distinctive:

    Every new source/header file must begin with this exact two-line header:

    line 37
  8. Very specific:

    Git Ignore Rule: Never create files in folders that are typically git-ignored (like build/).

    line 51
  9. Very specific:

    Consistency: If you see existing source files being referenced with ../ (e.g.

    line 52

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Safe Source File Generation

When creating new code files, it is critical to ensure they are placed in the project's source tree and NOT in build or temporary directories.

Protocol

1. Diagnose Environment

Before creating a file, always inspect the Current Working Directory (CWD).

Red Flags (Build Directory Indicators):

  • Presence of CMakeCache.txt, CMakeFiles/ folder.
  • Presence of .sln, .vcxproj, or .o / .obj files in the root of CWD.
  • The directory name is build, out, bin, or Debug/Release.
  • Presence of ZERO_CHECK.vcxproj or ALL_BUILD.vcxproj.

2. Locate Source Root

If you are in a build directory, identify the path to the Source Root.

  • Look for .git/, LICENSE, README.md, or the top-level CMakeLists.txt.
  • Calculate the relative path (e.g., ../ or ../../).

3. Verify Target Path

Ensure the parent directory of the file you intend to create exists in the Source location.

4. Execute with Relative Paths

Use the calculated relative prefix in the file path.

  • Bad: "examples/my_example.cpp" (If CWD is build/, this pollutes the build artifact folder).
  • Good: "../examples/my_example.cpp" (Escapes build dir to reach the actual source tree).

Required Copyright Header

Every new source/header file must begin with this exact two-line header:

// License: Apache 2.0. See LICENSE file in root directory.
// Copyright(c) YEAR RealSense, Inc. All Rights Reserved.

Critical rules:

  • YEAR must be the actual current calendar year -- run (Get-Date).Year (PowerShell) or date +%Y (bash) to confirm the year if unsure.
  • Never copy the year from a nearby or template file. Template files may be years old.
  • Wrong: // Copyright(c) 2022 RealSense, Inc. All Rights Reserved. (stale year copied from an existing file)
  • Right: // Copyright(c) 2026 RealSense, Inc. All Rights Reserved. (actual current year -- adjust as needed)

Important Tips

  • Git Ignore Rule: Never create files in folders that are typically git-ignored (like build/).
  • Consistency: If you see existing source files being referenced with ../ (e.g. ../src/main.cpp), likely you are in a build folder and should follow that pattern for new files.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.