query-writing
For writing and executing SQL queries - from simple single-table queries to complex multi-table JOINs and aggregations
Skill by bharathrajp14
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/bharathrajp14-query-writing
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, writing, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/query-writing
What's inside
- Skill name
query-writing- Description
- For writing and executing SQL queries - from simple single-table queries to complex multi-table JOINs and aggregations
- License
- MIT
- Instructions
- 62 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Query Writing Skill
## When to Use This Skill
Use this skill when you need to answer a question by writing and executing a SQL query.
## Workflow for Simple Queries
For straightforward questions about a single table:
1. **Identify the table** - Which table has the data?
2. **Get the schema** - Use `sql_db_schema` to see columns
3. **Write the query** - SELECT relevant columns with WHERE/LIMIT/ORDER BY
4. **Execute** - Run with `sql_db_query`
5. **Format answer** - Present results clearly
## Workflow for Complex Queries
For questions requiring multiple tables:
### 1. Plan Your Approach
**Use `write_todos` to break down the task:**
- Identify all tables needed
- Map relationships (foreign keys)
- Plan JOIN structure
- Determine aggregations
### 2. Examine Schemas
Use `sql_db_schema` for EACH table to find join columns and needed fields.
### 3. Construct Query
- SELECT - Columns and aggregates
- FROM/JOIN - Connect tables on FK = PK
- WHERE - Filters before aggregation
- GROUP BY - All non-aggregate columns
- ORDER BY - Sort meaningfully
- LIMIT - Default 5 rows
### 4. Validate and Execute
Check all JOINs have conditions, GROUP BY is correct, then run query.
## Example: Revenue by Country
```sql
SELECT
c.Country,
ROUND(SUM(i.Total), 2) as TotalRevenue
FROM Invoice i
INNER JOIN Customer c ON i.CustomerId = c.CustomerId
GROUP BY c.Country
ORDER BY TotalRevenue DESC
LIMIT 5;
```
## Quality Guidelines
- Query only relevant columns (not SELECT *)
- Always apply LIMIT (5 default)
- Use table aliases for clarity
- For complex queries: use write_todos to plan
- Never use DML statements (INSERT, UPDATE, DELETE, DROP)From bharathrajp14/myai, MIT.
More from bharathrajp14/myai
- 0.409score
blog-post
bharathrajp14
Use this skill when writing long-form blog posts, tutorials, or educational articles that require structure, depth, and SEO considerations
SkillDFreshness: DClaude Code +9 - 0.408score
social-media
bharathrajp14
Use this skill when creating short-form social media content for LinkedIn, Twitter/X, or other platforms
SkillDFreshness: DClaude Code +9 - 0.406score
AppLauncher
bharathrajp14
Launch and control desktop applications.
SkillDFreshness: DClaude Code +9 - 0.406score
BrowserControl
bharathrajp14
Browser automation and web interaction.
SkillDFreshness: DClaude Code +9 - 0.406score
CameraCapture
bharathrajp14
Image capture and visual processing.
SkillDFreshness: DClaude Code +9 - 0.406score
DailyBriefing
bharathrajp14
Generate personalized daily summaries.
SkillDFreshness: DClaude Code +9 - 0.406score
DeepReasoning
bharathrajp14
Extended thinking for complex problems.
SkillDFreshness: DClaude Code +9 - 0.406score
FileManager
bharathrajp14
File system operations.
SkillDFreshness: DClaude Code +9 - 0.406score
SystemInfo
bharathrajp14
System statistics and information.
SkillDFreshness: DClaude Code +9 - 0.406score
VoiceTTS
bharathrajp14
Text-to-speech and voice generation.
SkillDFreshness: DClaude Code +9 - 0.406score
WebResearch
bharathrajp14
Web search and content extraction.
SkillDFreshness: DClaude Code +9 - 0.404score
schema-exploration
bharathrajp14
For discovering and understanding database structure, tables, columns, and relationships
SkillDFreshness: DClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Apr 12, 2026 (6 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/bharathrajp14/myai
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from bharathrajp14
- 0.409score
blog-post
bharathrajp14
Use this skill when writing long-form blog posts, tutorials, or educational articles that require structure, depth, and SEO considerations
SkillDFreshness: DClaude Code +9 - 0.408score
social-media
bharathrajp14
Use this skill when creating short-form social media content for LinkedIn, Twitter/X, or other platforms
SkillDFreshness: DClaude Code +9 - 0.406score
CameraCapture
bharathrajp14
Image capture and visual processing.
SkillDFreshness: DClaude Code +9 - 0.406score
DailyBriefing
bharathrajp14
Generate personalized daily summaries.
SkillDFreshness: DClaude Code +9 - 0.406score
DeepReasoning
bharathrajp14
Extended thinking for complex problems.
SkillDFreshness: DClaude Code +9 - 0.406score
FileManager
bharathrajp14
File system operations.
SkillDFreshness: DClaude Code +9
Cite this page
query-writing skill. Agent Mart. https://agentmart.dev/skills/bharathrajp14-query-writing (last updated 2026-10-24)