add-new-file

Add and update generated file outputs for the PerfectHash library.

97|16|Updated May 17, 2018
One-click install
npx skills add https://github.com/tpn/perfecthash --skill add-new-file
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-new-file
Source: https://github.com/tpn/perfecthash/tree/main/skills/add-new-file
Command: npx skills add https://github.com/tpn/perfecthash --skill add-new-file

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the process of adding and updating generated file outputs for the PerfectHash library, ensuring consistency across build systems and test coverage.

Core Features & Use Cases

  • File Work Entry Management: Adds or updates entries in PerfectHashFileWork.h.
  • Callback Implementation: Implements PrepareXxxChm01 and SaveXxxChm01 callbacks.
  • Build System Integration: Registers new sources in CMakeLists.txt and project files (.vcxproj).
  • Testing: Updates generators and tests to cover new files.
  • Use Case: When a new file type needs to be generated by PerfectHash, this Skill ensures all necessary build configurations, source registrations, and test cases are updated automatically.

Quick Start

Add a new entry to src/PerfectHash/PerfectHashFileWork.h in VERB_FILE_WORK_TABLE with the right suffix/extension/EOF init.

Frequently Asked Questions about add-new-file

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

FAQPage Schema
How do I add a new generated file to the PerfectHash library build system?

To add a new generated file to the PerfectHash library, you insert an entry into the VERB_FILE_WORK_TABLE within PerfectHashFileWork.h, which automatically updates the build configurations and tests.

How do I integrate perfect hash generated files into CMake and Visual Studio projects?

Integrating perfect hash generated files into CMake and Visual Studio involves registering the new sources directly in CMakeLists.txt and the respective .vcxproj project files to ensure correct compilation.

What is the process for implementing prepare and save callbacks for PerfectHash file outputs?

Implementing prepare and save callbacks for PerfectHash file outputs requires adding the specific PrepareXxxChm01 and SaveXxxChm01 callback functions to manage how the generated artifacts are processed and stored.

How do I update tests when adding new file types to a perfect hash generator?

Updating tests when adding new file types to a perfect hash generator involves modifying the existing test suites and generators to ensure the newly added output files and artifacts are fully covered by automated testing.

Do I need to manually update CMakeLists.txt when generating new perfect hash files?

You do not need to manually update CMakeLists.txt when generating new perfect hash files if you use the automated workflow, which registers new sources in CMake and Visual Studio project files automatically.

Why are my new perfect hash output files not being compiled in the build system?

New perfect hash output files may not compile if the file work entry in PerfectHashFileWork.h is missing the correct suffix, extension, or EOF initialization required for build system registration.