{"id":26272078,"url":"https://github.com/codincat/kysely-prompt","last_synced_at":"2025-09-13T08:16:54.449Z","repository":{"id":281470911,"uuid":"945378386","full_name":"CodinCat/kysely-prompt","owner":"CodinCat","description":"A prompt to help AI (LLM) learn how to use Kysely. You may also want to give DeepWiki a try https://deepwiki.com/kysely-org/kysely","archived":false,"fork":false,"pushed_at":"2025-08-23T03:03:14.000Z","size":215,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-23T03:43:54.117Z","etag":null,"topics":["db","kysely","postgresql","prompt"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CodinCat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-09T09:23:05.000Z","updated_at":"2025-08-23T03:03:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"14e85bd6-7d2e-434f-839f-395fdfae0c31","html_url":"https://github.com/CodinCat/kysely-prompt","commit_stats":null,"previous_names":["codincat/kysely-prompt"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CodinCat/kysely-prompt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodinCat%2Fkysely-prompt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodinCat%2Fkysely-prompt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodinCat%2Fkysely-prompt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodinCat%2Fkysely-prompt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodinCat","download_url":"https://codeload.github.com/CodinCat/kysely-prompt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodinCat%2Fkysely-prompt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274936008,"owners_count":25376838,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-13T02:00:10.085Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["db","kysely","postgresql","prompt"],"created_at":"2025-03-14T07:16:44.693Z","updated_at":"2025-09-13T08:16:54.429Z","avatar_url":"https://github.com/CodinCat.png","language":null,"readme":"# kysely-prompt\n\n[Kysely](https://github.com/kysely-org/kysely) is a very powerful query builder, but due to my skill issue, writing more complex queries can sometimes be frustrating.\n\nThis repo is just a prompt to help LLMs learn how to write queries using Kysely. All the examples are just copied and pasted from official documentation or GitHub issues, with some tweaks to save tokens. I hand-picked different examples to make sure they're diverse enough to cover most common use cases, and sufficient for AI to learn the patterns/APIs of Kysely. For now, it's PostgreSQL only.\n\n## Usage\n\nJust feed [this prompt](./kysely-postgresql.txt) to the AI of your choice, and then you'll have a personal Kysely expert to help you write queries.\n\nThe prompt has around 10,300 - 12,000 tokens. Note that on chatgpt.com, free users only get an 8K context window. I recommend Gemini 2.5 Pro, which has an 1M context window and you can use for free at https://aistudio.google.com/\n\nFor example, you can ask questions like:\n\n\u003e How to do an upsert with the following table?\n\u003e \n\u003e ```sql\n\u003e CREATE TABLE products (\n\u003e     sku VARCHAR(50) PRIMARY KEY,\n\u003e     name text NOT NULL,\n\u003e     quantity INTEGER NOT NULL DEFAULT 0,\n\u003e     last_updated TIMESTAMPTZ NOT NULL DEFAULT NOW()\n\u003e );\n\u003e ```\n\nYou can also use it locally with something like Claude Code. The easiest way is just to put the prompt file in your project like `docs/kysely.md`, and then @ that file when you need to write some queries. You may want to remove some of the instructions at the beginning.\n\nThere is another modern tool called DeepWiki, it may also be helpful: https://deepwiki.com/kysely-org/kysely\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodincat%2Fkysely-prompt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodincat%2Fkysely-prompt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodincat%2Fkysely-prompt/lists"}