Update local QA skill workflow (#13)

This commit is contained in:
Daichi Narushima
2026-05-25 02:12:28 +09:00
committed by GitHub
parent c1eea3fa3d
commit c45efb953c
4 changed files with 56 additions and 52 deletions
+18 -21
View File
@@ -1,25 +1,22 @@
# local-qa ---
name: local-qa
description: Run local QA including formatting, linting, and testing for the repository. Use whenever any file has been updated.
disable-model-invocation: false
---
Run local QA checks (format, lint, test) on the repository. # Local QA (format, lint, and test)
## When to use Run the local QA script `scripts/qa.sh` in this skill.
After making changes to repository files, run `scripts/qa.sh` to validate formatting, linting, and tests. ## Procedure
## Steps - Execute the script exactly as shown above when this skill is triggered.
- Capture and summarize key output (success/failure, major warnings, and any files modified).
1. Execute `scripts/qa.sh` and capture the results. - If the script fails due to missing tooling (`command not found`, missing executable, or equivalent), install the missing tool(s) and rerun `./scripts/qa.sh`.
2. Report successes, failures, warnings, and any modified files. - Install tools using this order of preference:
1. Use the project's package manager when applicable (`uv`/`poetry` for Python, package manager scripts/dependencies for Node.js).
## If tools are missing 2. Use a system package manager (`brew` on macOS, `apt` on Debian/Ubuntu) when project-local install is not applicable.
3. Use language-specific installers as fallback (`pipx`/`pip`, `npm`, `go install`, etc.).
Install them following this priority order: - If multiple tools are missing, repeat install -> rerun until QA completes or you hit a blocker.
- If installation fails or requires unavailable privileges, report what was attempted, the exact failure, and stop.
1. Project package managers (`uv`, `poetry`, npm scripts) - Do not run unrelated commands; only run commands needed for QA and missing-tool installation.
2. System package managers (`brew`, `apt`)
3. Language-specific installers (`pipx`, `pip`, `npm`, `go install`)
## Constraints
- Only execute QA and tool-installation commands.
- If installation fails or requires unavailable privileges, report the attempt and exact failure, then stop.
+11 -4
View File
@@ -13,7 +13,14 @@ uv run pytest
npx -y prettier --write './**/*.md' npx -y prettier --write './**/*.md'
# GitHub Actions # GitHub Actions
zizmor --fix=safe .github/workflows case "${OSTYPE}" in
git ls-files -z -- '.github/workflows/*.yml' | xargs -0 -t actionlint darwin* | linux* )
git ls-files -z -- '.github/workflows/*.yml' | xargs -0 -t yamllint -d '{"extends": "relaxed", "rules": {"line-length": "disable"}}' zizmor --fix=safe .github/workflows
checkov --framework=all --output=github_failed_only --directory=. git ls-files -z -- '.github/workflows/*.yml' | xargs -0 -t actionlint
git ls-files -z -- '.github/workflows/*.yml' | xargs -0 -t yamllint -d '{"extends": "relaxed", "rules": {"line-length": "disable"}}'
checkov --framework=all --output=github_failed_only --directory=.
;;
* )
echo "GitHub Actions linting is only supported on Linux and macOS."
;;
esac
+20 -20
View File
@@ -50,26 +50,26 @@ python -m mt5cli -o account.csv account-info
## Commands ## Commands
| Command | Description | | Command | Description |
| ------------------ | ------------------------------------------- | | ------------------ | ----------------------------------------------------------- |
| `rates-from` | Export rates from a start date | | `rates-from` | Export rates from a start date |
| `rates-from-pos` | Export rates from a start position | | `rates-from-pos` | Export rates from a start position |
| `rates-range` | Export rates for a date range | | `rates-range` | Export rates for a date range |
| `ticks-from` | Export ticks from a start date | | `ticks-from` | Export ticks from a start date |
| `ticks-range` | Export ticks for a date range | | `ticks-range` | Export ticks for a date range |
| `account-info` | Export account information | | `account-info` | Export account information |
| `terminal-info` | Export terminal information | | `terminal-info` | Export terminal information |
| `version` | Export MetaTrader 5 version information | | `version` | Export MetaTrader 5 version information |
| `last-error` | Export the last error information | | `last-error` | Export the last error information |
| `symbols` | Export symbol list | | `symbols` | Export symbol list |
| `symbol-info` | Export symbol details | | `symbol-info` | Export symbol details |
| `symbol-info-tick` | Export the last tick for a symbol | | `symbol-info-tick` | Export the last tick for a symbol |
| `market-book` | Export market depth (order book) | | `market-book` | Export market depth (order book) |
| `orders` | Export active orders | | `orders` | Export active orders |
| `positions` | Export open positions | | `positions` | Export open positions |
| `history-orders` | Export historical orders | | `history-orders` | Export historical orders |
| `history-deals` | Export historical deals | | `history-deals` | Export historical deals |
| `order-check` | Check funds sufficiency for a trade request | | `order-check` | Check funds sufficiency for a trade request |
| `order-send` | Send a trade request to the trade server (`--yes` required) | | `order-send` | Send a trade request to the trade server (`--yes` required) |
Use `order-check` to validate a request payload before running `order-send --yes`. Use `order-check` to validate a request payload before running `order-send --yes`.
+7 -7
View File
@@ -74,13 +74,13 @@ mt5cli --login 12345 --password mypass --server MyBroker-Demo \
### Trading ### Trading
| Command | Description | | Command | Description |
| ---------------- | ------------------------------------------- | | ---------------- | ----------------------------------------------------------- |
| `orders` | Export active orders | | `orders` | Export active orders |
| `positions` | Export open positions | | `positions` | Export open positions |
| `history-orders` | Export historical orders | | `history-orders` | Export historical orders |
| `history-deals` | Export historical deals | | `history-deals` | Export historical deals |
| `order-check` | Check funds sufficiency for a trade request | | `order-check` | Check funds sufficiency for a trade request |
| `order-send` | Send a trade request to the trade server (`--yes` required) | | `order-send` | Send a trade request to the trade server (`--yes` required) |
Use `order-check` to validate a request payload before running `order-send --yes`. Use `order-check` to validate a request payload before running `order-send --yes`.