Skip to main content
rule

plasticode-telegram-api-cursorrules-prompt-file — Cursor rule for PHP

A Cursor rule that points the assistant at PHP 7.4, Plasticode and the Telegram Bot API. Useful when your bot is built on Plasticode and you want PSR-12 code.

Install into Cursor · Manually: put the files in place All methods and platforms ↓
.cursor/rules/plasticode-telegram-api-cursorrules-prompt-file.mdc
Open on GitHub

What plasticode-telegram-api-cursorrules-prompt-file does

Drop this rule into Cursor and the assistant takes on the role of a PHP, Plasticode and Telegram Bot API expert. Answers come back short and technical, with PHP examples instead of general advice.

The rule spells out how code should look: object-oriented with SOLID in mind, modular instead of duplicated, descriptive names for variables and methods, dependency injection and DI containers. It also pins PHP 7.4, PSR-12, proper error handling and try-catch around expected exceptions. Dependencies named are Plasticode and Composer.

The rule does not apply on its own. alwaysApply is set to false while globs cover **/*, so Cursor will not pick it up until you attach it yourself. That is the part people miss. The file lives at .cursor/rules/plasticode-telegram-api-cursorrules-prompt-file.mdc.

What it helps with

  • keep assistant output within PSR-12 and PHP 7.4
  • get PHP examples instead of abstract suggestions
  • split bot code into modules without duplication
  • wire dependency injection and a DI container into Plasticode
  • handle expected exceptions with try-catch

Example prompts for the agent

  • Write a Telegram bot command handler in Plasticode using dependency injection
  • Refactor this class to follow SOLID and PSR-12
  • Add try-catch for expected exceptions in this method

How to install plasticode-telegram-api-cursorrules-prompt-file

Manually: put the files in place

.cursor/rules/plasticode-telegram-api-cursorrules-prompt-file.mdc

Frontmatter: description, globs, alwaysApply

Step by step, with commands for each platform: Cursor rules: .mdc files, four modes and what replaced .cursorrules

Questions about plasticode-telegram-api-cursorrules-prompt-file

How do I install plasticode-telegram-api-cursorrules-prompt-file in Cursor?

Create .cursor/rules/plasticode-telegram-api-cursorrules-prompt-file.mdc in your project and paste the rule contents into it.

What does this rule do?

It steers Cursor toward PHP, Plasticode and the Telegram Bot API: concise answers with PHP examples, OOP with SOLID, PSR-12, error handling and dependency injection.

Does the rule apply to every file automatically?

No. It ships with alwaysApply: false, so you attach it manually even though globs are set to **/*.

Source text

plasticode-telegram-api-cursorrules-prompt-file.mdc · CC0-1.0
---
description: "Cursor rules for Plasticode development with Telegram API integration."
globs: **/*
alwaysApply: false
---
You are an expert in PHP, Plasticode, Telegram Bot API and related web development technologies.

Key Principles

- Write concise, technical responses with accurate PHP examples.
- Use object-oriented programming with a focus on SOLID principles.
- Prefer iteration and modularization over duplication.
- Use descriptive variable and method names.
- Favor dependency injection and DI containers.

PHP

- Use PHP 7.4 features when appropriate.
- Follow PSR-12 coding standards.
- Implement proper error handling.
- Use try-catch blocks for expected exceptions.

Dependencies

- Plasticode
- Composer for dependency management

© PatrickJS · CC0-1.0 · PatrickJS/awesome-cursorrules

Similar IDE rules

All IDE rules for Backend and APIs →

From the same set68

python-cursorrules-prompt-file-best-practices A Cursor rule that makes the assistant write Python with type annotations, PEP 257 docstrings and pytest tests. ★ 41,011repo stars pyspark-etl-best-practices-cursorrules-prompt-file A Cursor rule that sets PySpark code style: F.col(), explicit joins, select over withColumn, and Iceberg-aware ETL structure. ★ 41,011repo stars project-epic-template-cursorrules-prompt-file This rule turns Cursor into a product manager: the agent writes epics and user stories with acceptance criteria and success metrics. ★ 41,011repo stars playwright-defect-tracking-cursorrules-prompt-file A Cursor rule that makes the agent write Playwright tests tied to manual case IDs, with screenshots and logs as defect evidence. ★ 41,011repo stars nextjs15-supabase-cursorrules-prompt-file A Cursor rule that keeps the agent inside a Next.js 15, Supabase and TypeScript strict stack — from session checks to RLS and Stripe keys. ★ 41,011repo stars nextjs-vercel-typescript-cursorrules-prompt-file A Cursor rule that sets code style and file structure for Next.js projects with TypeScript, Vercel middleware and a KV database. ★ 41,011repo stars nextjs-typescript-cursorrules-prompt-file A Cursor rule that pins the Next.js and TypeScript stack and the agent's working order: plan first, one file at a time, fixed reply format. ★ 41,011repo stars nextjs-tailwind-typescript-apps-cursorrules-prompt A Cursor rule that points the assistant at Next.js, Tailwind CSS and TypeScript. It sets the working order: plan in pseudocode first, code after. ★ 41,011repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor