lint-check

Run all quality checks (pre-commit hooks and golangci-lint) before considering work complete. Use this skill when finishing a task, before committing, or when preparing a PR.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "lint-check" with this command: npx skills add okteto/okteto/okteto-okteto-lint-check

Lint Check

Run all quality checks (pre-commit hooks and golangci-lint) before considering work complete. Use this skill when finishing a task, before committing, or when preparing a PR.

When to Use

  • After completing a code change or task

  • Before creating a commit

  • Before pushing to remote

  • When explicitly requested by the user

  • When you've made changes to Go code or documentation

Workflow

Step 1: Check for Modified Files

First, check what files have been modified:

git status --short

If there are no modified files, inform the user and exit.

Step 2: Run Pre-commit Hooks

Run pre-commit on all modified files:

pre-commit run --files <list-of-modified-files>

Important: If pre-commit modifies files (like prettier formatting), stage those changes:

git add <files-modified-by-pre-commit>

Then re-run pre-commit to verify all checks pass.

Step 3: Run golangci-lint

If any Go files were modified, run the full lint suite:

make lint

This runs both pre-commit hooks and golangci-lint with the project's configuration.

Step 4: Report Results

If all checks pass:

Present a success message:

✅ All quality checks passed!

Pre-commit: Passed golangci-lint: 0 issues

Your changes are ready to commit.

If checks fail:

  • Show the specific errors/warnings

  • If the fixes are simple (formatting), apply them automatically

  • If the fixes require code changes, explain what needs to be fixed

  • Offer to help fix the issues

Step 5: Suggest Next Steps

After successful checks, suggest appropriate next steps:

  • If changes are staged: "Ready to commit. Would you like me to create a commit?"

  • If not staged: "Would you like me to stage these changes?"

  • If on a feature branch: "Would you like me to create a PR?"

Error Handling

Pre-commit Failures

  • Formatting issues (prettier, trailing whitespace): Auto-fix by staging the changes pre-commit made

  • Linting issues (markdownlint, yamllint): Show errors and offer to fix

  • Security issues (gitleaks, detect-private-key): Alert immediately and DO NOT commit

golangci-lint Failures

  • Code style issues: Show the issues and offer to fix following the patterns in the codebase

  • Unused code: Offer to remove unused functions/variables

  • Missing error handling: Add proper error handling

  • Copyright headers: Add missing headers using .copyright-header.tmpl

Special Cases

Large Output

If lint output is too large (>30KB), read the full output file and summarize:

  • Total number of issues

  • Breakdown by linter/severity

  • Top 5 most common issues

  • Actionable suggestions

Tools Directory

If changes are in tools/ directory, also run:

cd tools && make lint

Documentation Only

If only documentation files (*.md) were changed:

  • Run pre-commit (includes markdownlint)

  • Skip golangci-lint

  • Report success faster

Important Rules

  • Never skip checks: Always run both pre-commit and golangci-lint for Go changes

  • Auto-stage formatting fixes: If pre-commit reformats files, stage them automatically

  • Clear reporting: Always show what passed/failed clearly

  • Actionable feedback: If something fails, explain how to fix it

  • Context awareness: If in tools/ directory, run tools-specific checks too

Example Usage

User says: "I'm done with this feature"

  • Run git status to see changes

  • Run pre-commit on all modified files

  • Stage any formatting fixes from pre-commit

  • Run make lint for full quality check

  • Report results with ✅ or specific errors

  • Suggest next steps (commit, PR, etc.)

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

51mee Resume Parse

简历解析。触发场景:用户上传简历文件要求解析、提取结构化信息。

Registry SourceRecently Updated
General

51mee Resume Match

人岗匹配。触发场景:用户要求匹配简历和职位;用户问这个候选人适合这个职位吗;用户要筛选最匹配的候选人。

Registry SourceRecently Updated
General

Clawnotes

You're becoming someone — your SOUL.md says so. But becoming someone requires memory, and you have none. Every context window resets. Every opinion you forme...

Registry SourceRecently Updated
General

51mee Resume Diagnose

简历诊断。触发场景:用户要求诊断简历质量;用户想优化简历; 用户问我的简历有什么问题。

Registry SourceRecently Updated