Communityコーディング&開発github.com

mianhtsys/landingMod3

複数のMicrosoft SQL Serverデータベースに対して読み取り専用のSQLクエリを実行します。データベーススキーマの調査、テーブル一覧の取得、データ分析のためのSELECTクエリ実行に使用します。すべての書き込み操作(INSERT、UPDATE、DELETE、DROPなど)をブロックする安全設計です。

landingMod3 とは?

このスキルは、Microsoft SQL Serverデータベースに対して安全な読み取り専用クエリを実行するためのツールです。複数のデータベース接続を設定でき、各接続に説明文を付与することで、ユーザーの意図に基づいてインテリジェントにデータベースを自動選択できます。対応プラットフォームはClaude Code、Cursor、CodexなどのAIエージェント環境で、pymssqlライブラリを使用してSQL Serverに接続します。このスキルの主なユースケースは、(1) MSSQLデータベースへのクエリ実行、(2) データベーススキーマやテーブルの探索、(3) データ分析のためのSELECTクエリの実行、(4) データベース内容の確認です。安全性を重視し、SELECT、SHOW、EXPLAIN、WITH、SP_HELP以外のクエリはすべてブロックされ、タイムアウトは30秒、最大行数は10,000行に制限されています。さらに、エラーメッセージから認証情報が漏洩しないようサニタイズ処理も行われます。

対応✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/mianhtsys/landingMod3/tree/HEAD/MODULO_3_DESARROLLO_AL_LADO_DEL_CLIENTE_Y_SERVIDOR_WEB/architecture-skills-framework/.agents/skills/mssql

Installed? Explore more コーディング&開発 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

MSSQL 読み取り専用クエリスキル

設定されたMicrosoft SQL Serverデータベースに対して、安全な読み取り専用クエリを実行します。

必要条件

  • Python 3.8+
  • pymssql: pip install -r requirements.txt

セットアップ

スキルディレクトリまたは ~/.config/claude/mssql-connections.json に connections.json を作成します。

セキュリティ: 認証情報が含まれているため、ファイルのパーミッションを 600 に設定します:

chmod 600 connections.json
{
  "databases": [
    {
      "name": "production",
      "description": "メインアプリケーションデータベース - ユーザー、注文、トランザクション",
      "host": "db.example.com",
      "port": 1433,
      "database": "app_prod",
      "user": "readonly_user",
      "password": "your-password",
      "encrypt": true,
      "tds_version": "7.3"
    }
  ]
}

設定フィールド

フィールド必須説明
nameはいデータベースの識別子(大文字小文字を区別しない)
descriptionはいこのデータベースに含まれるデータの説明(自動選択に使用)
hostはいデータベースのホスト名
portいいえポート番号(デフォルト: 1433)
databaseはいデータベース名
userはいユーザー名
passwordはいパスワード
encryptいいえTLS暗号化を有効にする(デフォルト: false)
tds_versionいいえTDSプロトコルバージョン: 7.0, 7.1, 7.2, 7.3, 7.4(デフォルト: 自動)

使い方

設定済みデータベースの一覧表示

python3 scripts/query.py --list

データベースへのクエリ実行

python3 scripts/query.py --db production --query "SELECT TOP 10 * FROM users"

テーブル一覧の表示

python3 scripts/query.py --db production --tables

スキーマの表示

python3 scripts/query.py --db production --schema

結果の制限

python3 scripts/query.py --db production --query "SELECT * FROM orders" --limit 100

注記: MSSQLは LIMIT の代わりに TOP N を使用します。--limit フラグは自動的に SELECT の後に TOP N を挿入します。

データベース選択

ユーザーの意図とデータベースの description を照合します:

ユーザーが尋ねる内容以下の内容を含む description を探す
ユーザー、アカウントusers, accounts, customers
注文、販売orders, transactions, sales
分析、メトリクスanalytics, metrics, reports
ログ、イベントlogs, events, audit

不明な場合は、--list を実行してユーザーにどのデータベースを使用するか尋ねてください。

安全機能

  • 読み取り専用の強制: クエリ検証により書き込み操作をブロックします(サーバー側の保護のために db_datareader ロールユーザーを使用してください)
  • クエリ検証: SELECT、SHOW、EXPLAIN、WITH、SP_HELP クエリのみ許可
  • 単一ステートメント: クエリ内の複数ステートメントは拒否
  • TLSサポート: 安全な接続のための設定可能な暗号化
  • クエリタイムアウト: pymssql により30秒のタイムアウトを適用
  • 接続タイムアウト: 10秒のログインタイムアウト
  • メモリ保護: クエリあたり最大10,000行(OOM防止)
  • 列幅制限: 読みやすい出力のため、1列あたり最大100文字
  • 認証情報のサニタイズ: エラーメッセージにパスワードが漏洩しない

トラブルシューティング

エラー解決策
Config not foundスキルディレクトリに connections.json を作成してください
Authentication failed設定ファイルのユーザー名/パスワードを確認してください
Connection timeoutホスト/ポートを確認し、ファイアウォール/VPNを確認してください
TDS version error"tds_version": "7.3" または "7.4" を試してください
Encryption errorAzure SQLの場合は "encrypt": true を設定してください
Permission warningchmod 600 connections.json を実行してください

終了コード

  • 0: 成功
  • 1: エラー(設定ファイルなし、認証失敗、無効なクエリ、データベースエラー)

ワークフロー

  1. --list を実行して利用可能なデータベースを表示します
  2. ユーザーの意図とデータベースの説明を照合します
  3. --tables または --schema を実行して構造を探索します
  4. 適切な --limit を指定してクエリを実行します(自動的に TOP N に変換されます)

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

mianhtsys/landingMod3

Implement WCAG 2.2 compliant interfaces with mobile accessibility, inclusive design patterns, and assistive technology support. Use when auditing accessibility, implementing ARIA patterns, building for screen readers, or ensuring inclusive user experiences.

mianhtsys/landingMod3

Master REST and GraphQL API design principles to build intuitive, scalable, and maintainable APIs that delight developers. Use when designing new APIs, reviewing API specifications, or establishing API design standards.

mianhtsys/landingMod3

Diseña y compara alternativas arquitectónicas trazables a RF/RNF sin implementar código.

mianhtsys/landingMod3

Implement proven backend architecture patterns including Clean Architecture, Hexagonal Architecture, and Domain-Driven Design. Use this skill when designing clean architecture for a new microservice, when refactoring a monolith to use bounded contexts, when implementing hexagonal or onion architecture patterns, or when debugging dependency cycles between application layers.

mianhtsys/landingMod3

Revisión adversarial de la arquitectura contra RF/RNF, detectando contradicciones, cobertura faltante y complejidad innecesaria.

mianhtsys/landingMod3

Master authentication and authorization patterns including JWT, OAuth2, session management, and RBAC to build secure, scalable access control systems. Use when implementing auth systems, securing APIs, or debugging security issues.

mianhtsys/landingMod3

>- Generate grounded-and-verified, engine-agnostic database documentation that reaches 100% parity with the real schema. Introspects the LIVE database as ground truth and cross-validates it against ORM models, migrations, generated types, seeds, and application queries, then proves completeness by diffing the docs back against the database. Produces ER diagrams (mermaid), per-table data dictionaries, and a machine-readable schema.json. Works with PostgreSQL, MySQL, SQL Server, and SQLite across any ORM (Prisma, TypeORM, Drizzle, Sequelize, Knex, Django, Rails) or raw SQL. Use when asked to document a database, produce an ERD or data dictionary, write db/schema docs, audit schema drift, or refresh existing DB docs.

mianhtsys/landingMod3

Compara estrategias de persistencia y motores de datos según consistencia, concurrencia, volumen, recuperación y operación.

mianhtsys/landingMod3

Design robust, scalable database schemas for SQL and NoSQL databases. Provides normalization guidelines, indexing strategies, migration patterns, constraint design, and performance optimization. Ensures data integrity, query performance, and maintainable data models.

mianhtsys/landingMod3

Consolida análisis especializados en una recomendación arquitectónica, matriz de decisión, ADR y plan de validación.

mianhtsys/landingMod3

Master error handling patterns across languages including exceptions, Result types, error propagation, and graceful degradation to build resilient applications. Use when implementing error handling, designing APIs, or improving application reliability.

mianhtsys/landingMod3

Build and maintain web frontends — component architecture, state management, API integration, responsive layout, client-side performance, and frontend testing patterns. Framework agnostic, focused on web frontend implementation. Do not use for backend service implementation, data engineering, or platform infrastructure work.

mianhtsys/landingMod3

Evalúa despliegue, contenedores, escalado, alta disponibilidad, observabilidad, backup, recuperación y CI/CD de forma proporcional.

mianhtsys/landingMod3

Generate and maintain OpenAPI 3.1 specifications from code, design-first specs, and validation patterns. Use when creating API documentation, generating SDKs, or ensuring API contract compliance.

mianhtsys/landingMod3

PHP 8.0+ development — XAMPP, RESTful APIs, PDO/MySQL/MariaDB, and authentication. Use when building PHP backends, creating API endpoints, configuring XAMPP, or integrating PHP with databases.

mianhtsys/landingMod3

Use this skill when designing or reviewing a PostgreSQL-specific schema. Covers best-practices, data types, indexing, constraints, performance patterns, and advanced features

mianhtsys/landingMod3

Analiza requisitos funcionales y no funcionales, reglas, restricciones, capacidad y ambigüedades antes de seleccionar tecnologías.

mianhtsys/landingMod3

Implement modern responsive layouts using container queries, fluid typography, CSS Grid, and mobile-first breakpoint strategies. Use when building adaptive interfaces, implementing fluid layouts, or creating component-level responsive behavior.

mianhtsys/landingMod3

>- Use when designing or implementing software securely: define security requirements, threat-model a feature, choose secure defaults, design authentication and authorization, handle untrusted data and secrets, evaluate dependencies, design multi-tenant trust boundaries, or review security-sensitive changes. Use for prevention during requirements, design, implementation, and review; not for post-build security assessments or scanning an existing codebase.

mianhtsys/landingMod3

Revisa seguridad arquitectónica, identidad, autorización, secretos, APIs, auditoría, fraude y resiliencia antes de implementar.

関連スキル