docs: add claude skills for linting, pre-PR checks, running tests, se…#109
Merged
Conversation
…curity review, writing commits, and writing tests
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a set of “skills” Markdown guides under .claude/skills/ to standardize contributor workflows for linting, testing, pre-PR checks, security review, and commit/PR conventions in the bash-logger repo.
Changes:
- Add a “linting-code” skill documenting the repo’s pre-commit lint workflow (ShellCheck + MarkdownLint).
- Add “running-tests” + “writing-tests” skills covering suite selection, runner usage, and test authoring patterns.
- Add “pre-pr-checks”, “security-review”, and “writing-commits” skills for consistent PR hygiene, security review, and semantic commit/PR formatting.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| .claude/skills/linting-code/SKILL.md | Documents how to run linting via Make/pre-commit and interpret common failures. |
| .claude/skills/running-tests/SKILL.md | Documents how to discover and run targeted/full test suites and read output. |
| .claude/skills/writing-tests/SKILL.md | Provides a workflow for adding tests/suites and using assertion helpers. |
| .claude/skills/pre-pr-checks/SKILL.md | Defines a pre-PR gate checklist (lint, tests, commit audit, branch hygiene). |
| .claude/skills/security-review/SKILL.md | Adds a security review checklist mapped to repo-specific functions/tests. |
| .claude/skills/writing-commits/SKILL.md | Documents Conventional Commits / semantic-release commit + PR conventions. |
Comment on lines
+101
to
+102
| assert_command_succeeds "some_function arg" || return | ||
| assert_command_fails "some_function bad_arg" || return |
| @@ -0,0 +1,133 @@ | |||
| --- | |||
| name: writing-tests | |||
| description: Adds new tests to the bash-logger test suite. Covers creating new test suites, adding tests to existing suites, correct use of assertions, isolation patterns, and the mandatory call registration pattern. Use this skill whenever writing, extending, or fixing tests in the tests/ directory. | |||
| make lint | ||
| ``` | ||
|
|
||
| Fix all ShellCheck and MarkdownLint failures. MarkdownLint auto-fixes most issues and re-stages files — review them before continuing. |
|
|
||
| ### MarkdownLint | ||
|
|
||
| MarkdownLint runs with `--fix` — most formatting issues auto-correct and the file is re-staged. Violations that cannot be auto-fixed (long lines, wrong list markers) require manual edits. |
Comment on lines
+59
to
+60
| * After any file creation: check `-L` (reject symlinks), `-f` (must be regular file), `-w` | ||
| (must be writable). These three checks are mandatory in that order. |
| @@ -0,0 +1,155 @@ | |||
| --- | |||
| name: writing-commits | |||
| description: Generates correctly formatted commit messages and pull request descriptions for this repository. Uses Conventional Commits / semantic-release format with issue references. Use this skill whenever writing, reviewing, or amending a commit message or drafting a PR title and body. | |||
| @@ -0,0 +1,110 @@ | |||
| --- | |||
| name: running-tests | |||
| description: Runs the bash-logger test suite — either the full suite or a targeted subset. Use this skill whenever running, selecting, or interpreting tests in this repository. Covers discovering available suites, choosing which to run after a change, correct invocation syntax, and reading test output. | |||
| @@ -0,0 +1,98 @@ | |||
| --- | |||
| name: pre-pr-checks | |||
| description: Runs the full gate sequence before raising a pull request on bash-logger. Covers linting, targeted tests, full test suite, code review checklist, commit message audit, PR description requirements, and branch hygiene. Use this skill before pushing to a shared branch or opening a PR. | |||
| @@ -0,0 +1,240 @@ | |||
| --- | |||
| name: security-review | |||
| description: Reviews code changes in bash-logger for security issues across all protected domains. Use this skill whenever adding new features that handle external input, changing sanitization behaviour, adding config options, or reviewing a PR for security. Covers input sanitization, file system safety, config injection, environment variable attacks, journal command validation, sensitive data handling, and unsafe flag governance. | |||
| @@ -0,0 +1,91 @@ | |||
| --- | |||
| name: linting-code | |||
| description: Lints shell scripts and Markdown files in the bash-logger repository using the project's configured toolchain. Use this skill whenever checking code quality, fixing linting errors, or running lint as part of a pre-commit or pre-PR workflow. | |||
Owner
Author
|
@copilot apply changes based on the comments in this thread |
- Fold YAML front-matter description lines to stay within 200-char limit - Fix assert helper names: assert_command_succeeds/fails -> assert_success/failure - Clarify MarkdownLint auto-fix wording: files are not auto-staged, must git add - Update file validation order in security-review to include -e check (-L -> -e -> -f -> -w) Agent-Logs-Url: https://github.com/GingerGraham/bash-logger/sessions/9bfa25b1-a2a2-4c7b-8b51-0d3bc1a68cf5 Co-authored-by: GingerGraham <34165628+GingerGraham@users.noreply.github.com>
Contributor
Applied all changes from the review thread in commit
|
Owner
Author
|
🎉 This PR is included in version 2.5.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds a comprehensive set of skills documentation for the
bash-loggerrepository, covering linting, testing, pre-PR checks, security review, and commit conventions. These skill guides provide clear, standardized workflows and checklists to ensure code quality, security, and maintainability throughout the development lifecycle.Skills documentation added:
Linting and code quality:
.claude/skills/linting-code/SKILL.mddetailing how to lint shell scripts and Markdown files usingpre-commit, including tool configuration, command usage, key linting rules, and interpreting failures.Testing:
.claude/skills/running-tests/SKILL.mdexplaining how to discover, select, and run the test suites, map code changes to relevant tests, and interpret test output, with best practices and common mistakes to avoid.Pre-PR workflow:
.claude/skills/pre-pr-checks/SKILL.mdoutlining the full pre-PR gate sequence: linting, targeted and full tests, code review checklist, commit message audit, PR description requirements, and branch hygiene.Security review:
.claude/skills/security-review/SKILL.mdproviding a detailed security review checklist covering input sanitization, file system safety, config parsing, environment variables, journal command validation, sensitive data handling, and script name sanitization, with mappings to test suites.Commit and PR conventions:
.claude/skills/writing-commits/SKILL.mdspecifying the Conventional Commits format, PR title/body structure, and common mistakes, ensuring consistent commit history and changelog generation.…curity review, writing commits, and writing tests