home / skills / redisearch / redisearch / read-unmodified-c-module
This skill reads unmodified C module sources from a redis search engine project, enabling quick inspection before changes.
npx playbooks add skill redisearch/redisearch --skill read-unmodified-c-moduleReview the files below or copy the command above to add this skill to your agents.
---
name: read-unmodified-c-module
description: Read the source of the C module we are working on, before we made any changes.
---
# Read Unmodified C Module
Read the source of the C module(s) we are working on, as they were before we made any changes.
## Arguments
- `<module path>`: Module name to read (e.g., `src/numeric_range_tree` or `src/aggregate/aggregate_debug`), without extension
- `<module path 1> <module path 2>`: Multiple module names to read
If the path doesn't include `src/`, assume it to be in the `src` directory. E.g. `numeric_range_tree` becomes `src/numeric_range_tree`.
## Instructions
For each module path:
```bash
# Read header file
git show master:<module path>.h
# Read implementation file
git show master:<module path>.c
```
This skill reads the original C module source as it existed on the master branch before any local edits. It fetches both the header (.h) and implementation (.c) files for one or more module paths so you can inspect the unmodified code. It normalizes paths by assuming the src/ directory when not specified.
For each provided module path the skill runs two git show commands against master to stream the header and implementation files. If a path lacks an explicit src/ prefix, the skill prepends src/ automatically. Multiple module paths can be supplied and each pair of files is retrieved in sequence.
What input formats are accepted?
Supply one or more module paths without extensions. If you omit src/, the skill prepends src/ automatically.
What happens if a file is missing on master?
The git show command will fail for that file; handle missing files by verifying the exact module path or checking branch availability.